jonschlinkert / sublime-markdown-extended

Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
https://github.com/jonschlinkert
MIT License
660 stars 96 forks source link

Detect language even if it has CGI syntax options added #127

Open elboletaire opened 8 years ago

elboletaire commented 8 years ago

With jekyll 3.0 the recommended syntax highlighter for kramdown is rouge which allows us to generate code blocks using the tilde ~ but in some languages like in php, if you want to detect code without the opening tag, you need to specify the code block adding the option start_inline=1:

~~~php?start_inline=1
echo 'Hello world';
~~~

Adding any option using CGI syntax breaks the Markdown Extended highlighting for languages.

I would like to request to change the match for all the languages* and allow them to end with anything after a question mark.

Thanks in advance.

* Or at least php and erb, which are the ones described in the rouge docs: https://github.com/jneen/rouge#you-can-even-use-it-with-redcarpet