John Magolske <listm...@b79.net> writes: >> It happens because syntax coloring is a bit dumb. It uses regexps but >> not the parser. However, if you try, e.g., to export the document, the >> plus signs will not be treated as markers. > > Ok, just tried org-html-export-as-html and see it renders properly > in html: > > ... expression <code>(x +. y)</code> the <code>+.</code> is ... > > but I feel like there's a bug in the regex, that the =code= and > ~verbatim~ marker characters should be able to prevent any other > marker characters bracketed by them from causing highlighting.
Regexes recognize what is called a "regular" language which obeys a context-free grammar. Although modern regexes are a bit more powerful, it is still difficult (and computationally expensive) to have them recognize context (e.g. figure out that we are now inside a verbatim environment and so we need to do things differently). That's why context-sensitive grammars require parsers. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler