discord / SimpleAST

Extensible Android library for both parsing text into Abstract Syntax Trees and rendering those trees as rich text.
Other
371 stars 32 forks source link

fix(code): fix rules #35

Closed VoltrexKeyva closed 3 years ago

VoltrexKeyva commented 3 years ago

Fixed the rules screwing up the syntax highlighting.

Here are the benchmarks for finalizing the double backtick inline codeblocks:

The input of "`test` ``test``" copy-pasted 500 times has been benchmarked in the following results.

Old (Without double backtick inline codeblock support): average parse time of ~450-460 milliseconds. New (With double backtick inline codeblock support): average parse time of ~460-600 milliseconds.

The same tests as above has been benchmarked but also with the benchmark text found in the samples for the following results.

Old (Without double backtick inline codeblock support): average parse time of ~760-830 milliseconds. New (With double backtick inline codeblock support): average parse time of ~950-1090 milliseconds.

There are no performance regressions.

VoltrexKeyva commented 3 years ago

cc @AndyG