Re: Pygments YAML Lexer (from Spec Update)

Kirill Simonov <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Hi Jeff,

Jeff Kowalczyk wrote:
>> I'm happy to report that Kirill's YamlLexer implementation was accepted
>> right away into pygments main mercurial repository.
> 
> See the current output at:
> 
> http://pygments.org/demo/?lang=yaml&sort=
> 
> YamlLexer example.yaml http://pygments.org/demo/810
> 
> YAML.org homepage YAML http://pygments.org/demo/809
> 
> View HTML source to see the currently-unstyled CSS class id's, e.g:
> 
> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">

Thank you for your efforts, Jeff!

I've noticed that plain scalars within flow collections are highlighted, 
but those outside [] or {} are not.  This is because for 
'plain-scalar-in-flow-context', the class Name.Variable is used while 
'plain-scalar-in-block-context' still uses Literal.Scalar.Plain.  Also 
escape codes got highlighted with String.Escape, but escape characters 
didn't.

Personally, I'll prefer to have all scalar text not to be highlighted at 
all.  Instead it would be most useful if the punctuation marks 
(indicators) are highlighted so that the document structure is emphasized.


Thanks,
Kirill


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.