-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown support #7
Comments
I wrote some support for Markdown to HTML, however, it currently displays HTML in the preview window instead of what the HTML would actually render. This may be useful for some, but I didn't create a PR since I don't think it should be published in this state. |
Another feature to consider when this gets implemented: default syntax highlighting in code blocks based on the file extension(s). For example:
Maybe a port or wrapper of Linguist could be used to auto-detect the grammar of non-fenced code blocks, and if that fails, the grammar based on the file extension will be used. Example: consider a file named post.html.md
Should render as: This is a post about HTML. Here's some HTML code: <p id=status>
This page has super cow powers.</p> Here's some JavaScript: alert('What is the answer to life the universe and everything?'); And some CSS: body {
font-family: 'Comic Sans' !important;
color: #ff0 !important;
} |
@jordanbtucker I don't think people should actually change part of the filenames just for the previewer. But the usual block code notation would be really helpful: |
After #32 this will become a little more difficult to implement, given that the new focus is on source-to-source compilers (transpilers), and will be using an extended EditorView from now on. However, as was done with 5c723c4 to allow for popup message overlays, we can provide an HTML overlay such that language renderers could display more than text and could provide HTML (Spacepen Views) to render -- which would overlay the EditorView when applicable. |
Would this overlay still auto-update upon change of the source file? |
Exactly! I think this is ideal, too. Use Marked, I believe is the latest and greatest. I am assuming it supports GitHub Flavoured Markdown, given it is the successor of https://www.npmjs.org/package/github-flavored-markdown |
Would anyone like to contribute and make a PR for this? I am available today to help out, too. If not, I may get started on adding the HTML layer and providing a little API for Preview renderers to use. |
@jordanbtucker I am going to look into your PR and implement the HTML overlay for displaying the HTML preview and not the HTML code. |
|
It would make sense to include partial Multimarkdown/PHP Markdown Extra support too (<= see that specific feature request). |
(Already covered in the markdown-preview atom package, but would still be nice for it to be universal)
The text was updated successfully, but these errors were encountered: