Hi,
using Markdown a lot from time to time I looked at Brads bundle.
I modified it in these ways:
# NEW
* MultiMarkdown Language Grammar.
This is really just a wrapper for Markdown and includes the following `firstLineMatch = '^Format:.*$';` to distinguish between Markdown and MultiMarkdown. This makes the commands work unambiguously (Scope: `text.html.multimarkdown`). It assumes, that one starts the file with the Format Meta Tag, though. But this is a good idea anyway, I think :). Otherwise normal Markdown grammar will match. * Added “Preview” which renders the file in the HTML view.
* “Generate Output and open in Browser” stores the result of the HTML conversion in a file `output.html` in the current files directory (for now) and opens the file in the browser. This is particularly useful when using the “Style” Meta Tag to make use of a stylesheet which cannot be found by the “Preview” command because the file is in some temp directory really when viewing it in the HTML Preview. # CHANGED
* Scopes of all commands changed to `text.html.multimarkdown` (see above) * Convert Document / Selection to HTML
Omitted the clutter the Markdown bundle introduced by parsing heading and adding ids to them. This is done automagically by MultiMarkdown.
# TODO/Issues
* Omitting “Format: complete” seems to break the commands like “Convert Document/Selection to LaTeX”, maybe we should catch that * “Generate Output and open in Browser” will save the file in “/” (root directory) because `$TM_DIRECTORY` is not set. * Add a "Readme" that explains what is needed: e.g. `htmldoc` for the PDF Conversion
Soryu.
PS: And of course we should also include the “RTF Generation” command :)