forked from madskristensen/WebEssentials2013
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable syntax highlighting for code in the Markdown Preview
- Replaced MarkdownSharp with CommonMark.net given that it support natively fenced code blocks. It also provide a more robust markdown specification that make markdown more predictable to write and parse. - Removed the setting that were used to customize MarkdownSharp behavior. - Added the ability for the user to define a custom html template that is used to display the markdown preview. Syntax highlighting can then be applied by using one of the many javascript libraries available on the web. Just include the required external dependecies (js,css, etc..) like one would have to do when hosting the markdown in a normal webpage. External resources can be pulled also directly from the web. The code will look for an html file called WE-Markdown.html first in the project folder and then in the solution folder. The same behavior has been extended to the WE-Markdown.css file. Four custom place holder are provided: {##SOLUTION_PATH_PLACEHOLDER##} {##PROJECT_PATH_PLACEHOLDER##} {##DOCUMENT_PATH_PLACEHOLDER##} {##MARKDOWN_HTML_PLACEHOLDER##} These placeholders can be used for instance to control where the external dependencies are pulled from. The base element is set in the default template generated by the menu item to {##DOCUMENT_PATH_PLACEHOLDER##}. This ensure the most confortable experience in VS, given that, for example, when an images is pasted or dragged into a markdown document, the generated path to the image is relative to the markdown document itself. - Added a menu to generate a default global solution html template (like the one for the custom stylesheet). Note that the generated html does not include any reference to a javascript library to provide syntax highlighting. The user will need to choose one and modify the template accordingly. - Added Code to try to automatically enable the internet features required to load and execute javascript in the embedded WebBrowser. A message will be printed in the visual studio output pane if something goes wrong.
- Loading branch information
1 parent
c3d4ecc
commit f328cee
Showing
12 changed files
with
687 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters