Re: [Boost-docs] Trac syntax highlighting for QuickBook, first attempt

Subject: Re: [Boost-docs] Trac syntax highlighting for QuickBook, first attempt
From: Kai Brüning (kai_at_[hidden])
Date: 2007-08-20 14:13:14

>Kai Brüning wrote:
>>> As a result,
>>> - [pre .. ] does not work correctly so far.
>>> - It is not possible to highlight (some) marked text differently,
>>> like specifically styled text or table headers.
>>> * The reasons not to count the nesting are twofold:
>>> - The existing Pygments lexers are mostly kept very simple, having a
>>> lot less states than I created so far. I'd like to stick with this
>>> style as much as possible.
>>> - It would probably be hard (even impossible with regexes?) to
>>> correctly track escaped markup characters. Currently I handle the
>>> simple case (like \[) in most cases, but not multiple escape
>>> characters (like \\[ -> markup, \\\[ -> no markup). Although unlikely
>>> in practice, I do not like the idea too much to do nesting tracking
>>> which can easily be broken.
>Could you use lookbehind to deal with escapes, something like:
>To match [pre ... ] with any \]'s included as part of the block?

Hi John,

the real problem is that [pre ... ] can contain phrase-level markup, that is I would have to count markup nesting levels. Nevertheless you suggestion is a nice way to check for \] in some other cases.

>Just thinking aloud here, and probably you've been all around stuff like
>this already :-)
>>> Questions:
>>> * Am I moving in the right direction?
>Yep, looks good. Might be nice to have sections and headings stand out more
>though (the text of the heading that is).

Looks like I will do markup nesting. Needed for this request and for [pre ... ] and probably for the next request somebody comes up with, too.


This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC