Skip to content
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

Support startinline option for php highlighting via pygments #1271

Closed
omerida opened this issue Apr 29, 2014 · 3 comments
Closed

Support startinline option for php highlighting via pygments #1271

omerida opened this issue Apr 29, 2014 · 3 comments

Comments

@omerida
Copy link

omerida commented Apr 29, 2014

Pygments supports a startinline option for PHP code blocks so that the code is still highlighted without requiring an opening php tag, ie <?php, at the top of a block.

Particularly for short code blocks, it'd be nice to be able to ommit the opening PHP tag and send the startinline option to the highlighter.

I found this option in jekyll/jekyll#1633

@GaryJones
Copy link

+1 for this.

Having to add the <?php for each code block just to get highlighting is confusing (they copy that bit of the snippet as well) and distracting (they wonder why it's there) for readers.

@jgm jgm closed this as completed in 84391a8 Jun 19, 2014
@jgm
Copy link
Owner

jgm commented Jun 19, 2014

I've updated pandoc's highlighting library (not pygments) so it doesn't require the opening <?php tag. You don't need to use a startinline option.

@GaryJones
Copy link

Great!

I spent about 6 hours today trying to filter in pygments.hs or pygments.php and failed, then managed to get non-delimiter highlighting working by following the instructions at https://groups.google.com/forum/#!msg/pandoc-discuss/IjZ0xTPfhA0/IVlZW2b7AUQJ to change highlighting-kate then recompile it and pandoc (having never compiled anything before today)!

Can you link to the change in highlighting-kate please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants