mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Workaround for the regex problem
This commit is contained in:
11
README.md
11
README.md
@ -9,12 +9,6 @@ to turn your files into a pile of json describing its
|
||||
constituent tokens, because I have not implemented any
|
||||
formatters, yet, only the part that parses the code (the lexers).
|
||||
|
||||
TO make this even more "not there yet", Crystal doesn't allow
|
||||
for creating regular expressions that are MULTILINE but not
|
||||
DOT_ALL, whcih means I can't reproduce the behaviour of the
|
||||
golang (or Python's) regular expressions, so that causes
|
||||
issues unless you go and patch Crystal itself (don't patch Crystal itself, please)
|
||||
|
||||
# A port of what? Why "kind of"?
|
||||
|
||||
Because I did not read the Pygments code. And this is actually
|
||||
@ -27,9 +21,8 @@ and a pile of test cases from Pygments, and I slapped them together
|
||||
until the tests passed and my code produced the same output as
|
||||
Chroma. Think of it as *extreme TDD*.
|
||||
|
||||
With a patched Crystal regex engine [see here](https://forum.crystal-lang.org/t/regex-that-is-multiline-but-not-dotall-how/7054)
|
||||
the pass rate for tests in the supported languages is 96.8%, which
|
||||
is *not bad for a couple days hacking*.
|
||||
Currently the pass rate for tests in the supported languages
|
||||
is `96.8%`, which is *not bad for a couple days hacking*.
|
||||
|
||||
This only covers the RegexLexers, which are the most common ones,
|
||||
but it means the supported languages are a subset of Chroma's, which
|
||||
|
Reference in New Issue
Block a user