Closed bkeepers closed 10 years ago
/cc @tnm @tmm1 @rick @arfon
:+1: it's not in the Pygments changelog, but this also includes a new Handlebars lexer.
The NixOS project could really benefit from the new tokenizer in the latest pygments, which would bring syntax highlighting to tens of thousands of Nix packages.
@tmm1 If this PR looks good, would you mind merging and rolling a new release, please?
/cc @tnm @rick @arfon
Not sure why I didn't see the original cc: -- yay Inbox 3000.
Confirmed that I still see that test failure locally. I'll :eyes: this and see if any wisdom arises.
That test will pass if we provide a lexer argument:
diff --git a/test/test_pygments.rb b/test/test_pygments.rb
index 61df666..37c9835 100644
--- a/test/test_pygments.rb
+++ b/test/test_pygments.rb
@@ -88,7 +88,7 @@ class PygmentsHighlightTest < Test::Unit::TestCase
end
def test_highlight_works_with_single_character_input
- code = P.highlight("a")
+ code = P.highlight("a", :lexer => 'rb')
assert_match 'a</span>', code
end
@@ -283,5 +283,3 @@ class PygmentsConfigTest < Test::Unit::TestCase
assert list['Html'][:aliases].include?('html')
end
end
-
-
I'm coming at this very fresh, though, so I don't know if requiring a test change is a bad sign, something related to the upgrade, or just noise.
@rick Thanks for looking into this!
Done in #127
Ran
rake vendor:update
.There is one failing test that seems like a legitimate failure. The test was added in d6a8f2af7d20eb71184d6bd7ca60e00501146e88, which appears to be testing pipes and not necessarily the expected output.