rubychan / coderay

Fast and easy syntax highlighting for selected languages, written in Ruby.
http://coderay.rubychan.de/
Other
847 stars 115 forks source link

Brittle CSS rules #142

Open korny opened 11 years ago

korny commented 11 years ago

Color style rules can conflict, eg. when you have two kinds defining a .content sub-token. The issue appeared in the Lua scanner: https://github.com/rubychan/coderay/pull/22#issuecomment-19866252

To fix this, we would need to make the CSS selectors more strict (using the > operator, for example), but this has to be tested and supported by the CSS mini-interpreter in Encoders::HTML::CSS#get_style_for_css_classes.