-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precedence of style lookup is inverted #280
Comments
I think the reason this wasn't detected by the test suite is because the test is ambiguous. It will assert true regardless of order of precedence in the implementation. When I send a pull request, I'll make sure that the test catches this distinction. |
mojavelinux
added a commit
to mojavelinux/rouge
that referenced
this issue
Jun 28, 2015
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge - organize the code to setup syntax highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - don't crash if color value is 3-digit hex in span style
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge for highlighting source listings - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge for highlighting source listings - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge for highlighting source listings - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge for highlighting source listings - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jun 28, 2015
- add integration with Rouge for highlighting source listings - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280)
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
mojavelinux
added a commit
to mojavelinux/asciidoctor-pdf
that referenced
this issue
Jul 6, 2015
- add integration with Rouge for highlighting source listings - use no-break space for indent guard instead of zero-width space - guard indentation within Rouge formatter - organize the code to setup source highlighting - enable line number support when highlighting with Rouge - add pastie theme for Rouge - patch Rouge style lookup (see rouge-ruby/rouge#280) - cast lookup collections to set - optimize code
jneen
added a commit
that referenced
this issue
Sep 10, 2015
resolves #280 use proper precedence when resolving style for token
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When resolving the style for a token using the
style_for
method (which eventually delegates toget_own_style
), the precedence is backwards. What's expected is a more specific (nested) style to win over a more general (ancestor) style. However, the inverse is true.I think that the following logic:
should in fact be:
The test case is as follows:
When I invoke:
I expect to get:
Instead, I get:
As a result, this makes the behavior of Rouge inconsistent with the behavior of Pygments.
The text was updated successfully, but these errors were encountered: