Git Product home page Git Product logo

markdownmode's People

Contributors

axelheer avatar bigt avatar ewsoftware avatar mrchief avatar noahric avatar sharwell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

markdownmode's Issues

The markdown preview window couldn't open

When I create a new txt file and append the md extension, the markdown preview window work well. but when I close the file, and
open it again, the editor couldn't display the markdown syntax.

I used visual studio 2010,and the latest markdown mode.

Thanks for your help.

MEF Component Cache Exception

This extension in VS pro 2015 is causing an MEF component cache exception on startup when opening a solution of 20 projects, none of which have markdown. Information on crash and configuration is below. As it stands, if the extension is enabled it causes the exception every other startup as the ones where it does not crash are on a freshly built cache. Disabling the extension resolves the issue. IIRC this was also an issue on update 2.

The exception entry from the activity log is:

611
2016/06/30 18:03:08.433
Error
Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost
A MEF Component threw an exception at runtime: Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException: The Visual Studio component cache is out of date. Please restart Visual Studio. at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.<LoadAssembly>b__15_0(AssemblyName assemblyNameParam) at Microsoft.VisualStudio.ExtensibilityHosting.Utilities.SafeGetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Object lockObj, Func2 valueFactory) at Microsoft.VisualStudio.ExtensibilityHosting.FaultCatchingAssemblyLoader.LoadAssembly(AssemblyName assemblyName) at Microsoft.VisualStudio.Composition.Reflection.TypeRef.get_ResolvedType() at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_ImportingSiteType() at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_ImportingSiteTypeWithoutCollection() at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_IsLazy() at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_LazyFactory() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports() at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()

The dump of the current configuration is:
Microsoft Visual Studio Professional 2015
Version 14.0.25421.03 Update 3
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

LightSwitch for Visual Studio 2015 00322-40000-00000-AA132
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015 00322-40000-00000-AA132
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015 00322-40000-00000-AA132
Microsoft Visual Basic 2015

Visual C# 2015 00322-40000-00000-AA132
Microsoft Visual C# 2015

Visual C++ 2015 00322-40000-00000-AA132
Microsoft Visual C++ 2015

Visual F# 2015 00322-40000-00000-AA132
Microsoft Visual F# 2015

Application Insights Tools for Visual Studio Package 7.0.20622.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1 14.1.20624.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9 14.0.20316.0
Azure App Service Tools v2.9

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Color Theme Designer 1.0
Designer for creating new color themes

Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio 1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

Microsoft .NET Core Tools (Preview 2) 14.1.20624.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure HDInsight HQL Service 2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio 2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

NuGet Package Manager 3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio 2.2.40623.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration 2.2.40623.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support 2.2.40623.00
Profiling support for Python projects.

Sandcastle Help File Builder SHFB
Visual Studio integration for the Sandcastle Help File Builder.
https://GitHub.com/EWSoftware/SHFB

Snippet Designer 1.6.2
Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE

SQL Server Analysis Services 13.0.1601.5
Microsoft SQL Server Analysis Services Designer
Version 13.0.1601.5

SQL Server Data Tools 14.0.60525.0
Microsoft SQL Server Data Tools

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services 13.0.1601.5
Microsoft SQL Server Reporting Services Designers
Version 13.0.1601.5

tangible T4 Editor 2.3.0
tangible engineering GmbH

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript 1.8.34.0
TypeScript tools for Visual Studio

VisualSVN 5.1.4
Integration with Subversion version control. For more information about VisualSVN, see the VisualSVN website at http://www.visualsvn.com
Copyright © 2005-2016 VisualSVN Ltd. All rights reserved.

Windows Installer XML Toolset 3.10.3.2917
Windows Installer XML Toolset version 3.10.3.2917
Copyright (c) .NET Foundation and contributors. All rights reserved.

Wrong colorization in editor for ``` code blocks

Here's a picture to illustrate the problems:

markdownmodewrongcolorization

  • Sometimes the language-name is green, sometimes black (should always be black)
  • Sometimes some non-indented code lines are green, sometimes black (should always be green)
  • Sometimes the closing-triple-blacktick is mixed colors (should always be black)
  • Sometimes the paragraph following the closing-triple-backtick has the wrong colors (I'm not sure what's going on here)

Extension is not only for VS2010

The project description and README suggest that this extension is only for VS2010, however it works well in VS2013 (and possibly VS2012 as well).

Indented list text interpreted as blockquote

Text like the following renders correctly in the preview, but wrong in the editor:

 - A list item

    Indented text within the list.

In the editor, it appears as blockquote. The problem is that within a list indented text should only be considered a blockquote if it is indented twice.

Preview window encoding issue

The encoding seems off. When using characters like å, the preview window shows it as Ã¥. When commited to BitBucket it shows correctly on their site.

Editor is slow in files with extensive markup

For example, the markdown editor is completely unusable for the following file:
https://github.com/openstacknetsdk/openstack.net/wiki/Feature-Support

This appears to be caused by the regular expressions used by the editor features, which are more complicated than the expressions used by MarkdownSharp due to alterations required to support processing without first normalizing newline characters and expanding hard tabs to the correct number of spaces.

I'm currently working on a solution (80% done). Instead of using a string to represent the text in MarkdownParser, I used ITextBufferFactoryService to create a new ITextBuffer. This allows modifying the buffer, following by using ITrackingSpan to map spans of modified text back to their original locations in the source text (i.e. we can now normalize the file prior to parsing).

A few enhancements to make this a documentation browser

With a few enhancements, MM could easily be used as a documentation browser for our source code.

The three enhancements I'm thinking of:

  • Custom stylesheet/layout, on a per-solution basis. Just a way to make the preview prettier and add boilerplate HTML
  • Handle relative links correctly. In my Markdown, if I have a link to test.md it should tell VS to open that file if it exists. This will make it MM acts as a browser almost within VS. It will open extra tabs, but then you can use VS' built in back/forward to navigate between docs.
  • Switch to using Pandoc to generate HTML

Markdown# is cool, but I've had better luck packaging Pandoc.exe and executing it against markdown files to generate HTML. Here's a sample in C#:

// Process to output dir
var pandocStart = new ProcessStartInfo();
pandocStart.FileName = "pandoc";

// Standalone HTML generation using a template file
// Use Github Markdown processing!
pandocStart.Arguments = "pandoc -r markdown_github --highlight-style=kate --template=template.html --toc";
pandocStart.RedirectStandardError = true;
pandocStart.RedirectStandardOutput = true;
pandocStart.RedirectStandardInput = true;
pandocStart.UseShellExecute = false;
pandocStart.CreateNoWindow = true;
pandocStart.WindowStyle = ProcessWindowStyle.Hidden;

using (var pandoc = Process.Start(pandocStart))
{
    var rawText = File.ReadToEnd(markdownFile);
    string html;

    using (StreamWriter writer = pandoc.StandardInput)
    {
        await writer.WriteAsync(rawText);
    }

    using (StreamReader reader = pandoc.StandardOutput)
    {
        html = await reader.ReadToEndAsync();
    }

    using (StreamReader reader = pandoc.StandardError)
    {
        var error = await reader.ReadToEndAsync();

        if (!String.IsNullOrEmpty(error))
        {
            throw new Exception(error);
        }
    }

    // Do something with the HTML generated by Pandoc
}

I think this is better than using M# because it supports all sorts of extensions including tables, fenced code blocks, auto ID generation, and more (documented by Pandoc). Even cooler, it supports Pandoc title blocks or MultiMarkdown title blocks.

Support previewing ``` style code blocks

The preview window supports indented code blocks, but not those escaped with triple-backticks:

```csharp
var foo = Foo();
foo.Bar();
```

Such code is styled with a monospace font, but it wraps onto one line instead of honouring line breaks. If the output is styled using CSS, then the white-space: pre-wrap rule should be applied.

Umlauts are not rendered correctly

I noticed that German umlauts don't get rendered correctly in the preview pane.
"Copy HTML to clipboard" does not have that issue.

(Funny enough, the original markdown implementation in Perl seems to have a similar problem.)

Sample (download file):

# Überschrift 1
Die süße Hündin läuft in die Höhle des Bären, der sie zum 
Teekränzchen eingeladen hat, da sie seine drei schönen 
Krönchen gerettet hat, was sie wie folgt angestellt hat: 
Sie läuft über einen Fluss und tötet alle grünen Frösche, 
die über die Krönchen wachen, so hat sie diese schönen 
Krönchen gerettet.

Screenshot:
Screenshot

Also support underlines for headings

not sure if this is part of the official markdown spec, but on github you can make headlines by underlining them with "=" (for h1) and "-" (for h2). I think having support for that would be extremely neat :)

Block font could do better than Courier New

The font used in the editor for blocks is Courier New, and it doesn't appear that this can be changed. Consolas would be a better default, although if it would be user-selectable, I think I'd change it to something like Verdana to improve typographic readibility and conserve real estate, but still be different than normal text (for an inline block, there is rarely any need for the alignment benefits of a non-proportional font).

"More Information" links to blog, not product

After the extension is installed, in VS2012, from the Extension and Updates window, under the Installed section of the treeportion (not the the Online section), the More Information link points to a blog that doesn't directly deal with the extension. A link to either the GitHub or VS gallery page would be better (those two can link to each other).

Cannot go "back" from a clicked link

Environment:

Microsoft Visual Studio Ultimate 2012
Version 11.0.60315.01 Update 2
Microsoft .NET Framework
Version 4.5.50709

Markdown Mode version 2.4

If I have a markdown document with links to http or https pages in it, when I click a link in the markdown preview window (in order to check the link goes to the correct destination) I cannot then go back to the original markdown preview.

With the preview window in focus:

  • Alt + left arrow does not work;
  • backspace does not do anything;
  • neither does Ctrl+- or the back button on the Visual Studio toolbar (I'm not sure these two should, as they are usually used to go to your last code location, but I thought I would try them anyway);
  • closing and re-opening the preview window does not restore the original preview.

The only way to restore the preview is to close the whole markdown document, and then the preview window will re-sync with the document.

Some preview content should be encoded

First, let me say I absolutely love this extension!

When I include javascript or html source code in my markdown file, they are both executed. That code should be encoded when between the markers. Not encoding javascript results in constant error messages while editing markdown files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.