Order of definitions in source-highlight 2.10
[email protected] Sun, 24 Aug 2008 17:33:16 -0500
| Newsgroups | gmane.comp.gnu.source-highlight.general |
|---|---|
| Message-ID | <[email protected]> |
I just upgraded source-highlight to 2.10 and I am noticing some strange behavior. Suppose we have the file foo.lang: symbol = "/" comment start "//" And the file test.foo: // foo The language definition is taken from the source-highlight manual, section 7.4: "Order of definitions". Note that the definitions are in the wrong order, according to the manual: "The first expression will always be matched first, and the second expression will never be matched." And yet: $ source-highlight --lang-def=foo.lang -c foo.css --no-doc -i test.foo <!-- Generator: GNU source-highlight 2.10 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><span class="comment">// foo</span> </tt></pre> This was different with version 2.9: $ source-highlight --lang-def=foo.lang -c foo.css --no-doc -i test.foo <!-- Generator: GNU source-highlight 2.9 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre><tt><span class="symbol">//</span><span class="normal"> foo</span> </tt></pre> What has changed between version 2.9 and 2.10?