Pygment's PhpLexer has a 'startinline' option so that the '<?php' preamble isn't needed. I think that would be helpful almost all the time (frequently code snippets of php don't have that). Can we turn it on as part of the markdown extension?
Seems like we'll need to implement own codehilite-like extension to do that. It'll involve subclassing a couple of codehilite classes and some copypaste from them. Don't sure if it worth it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I guess I was hoping there would be a somewhat simple way to enable that option through our existing markdown extension setup. If, as you say, it'll be complex and ugly, and take a fair bit of time to set up now (and in the future to maintain extra layers of code), then we shouldn't spend time working on it now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seems like we'll need to implement own codehilite-like extension to do that. It'll involve subclassing a couple of codehilite classes and some copypaste from them. Don't sure if it worth it.
Okay, I guess I was hoping there would be a somewhat simple way to enable that option through our existing markdown extension setup. If, as you say, it'll be complex and ugly, and take a fair bit of time to set up now (and in the future to maintain extra layers of code), then we shouldn't spend time working on it now.
Yeah, seems like this is the only way. Codehilite doesn't provide any options to configure lexers.
Closed #529 on our side.