summaryrefslogtreecommitdiff
path: root/tests/examplefiles/exampleScript.cfc
diff options
context:
space:
mode:
authorKen <kenny2minecraft@gmail.com>2020-10-14 13:18:39 +0800
committerGitHub <noreply@github.com>2020-10-14 07:18:39 +0200
commit3e1b79c82d2df318f63f24984d875fd2a3400808 (patch)
tree6ac37f4df67e887b6ce4715003f7971bfc1afb5d /tests/examplefiles/exampleScript.cfc
parent5d6b610fc2e318ffcab953095ad5ff7db8681337 (diff)
downloadpygments-git-3e1b79c82d2df318f63f24984d875fd2a3400808.tar.gz
TNTLexer: Don't crash on unexpected EOL. (#1570)
* TNTLexer: Don't crash on unexpected EOL Catch IndexErrors in each line and error the rest of the line, leaving whatever tokens were found. * Write and pass tests for Typographic Number Theory pygments/lexers/tnt.py: * Fix indentation on import * Fix: TNTLexer.cur is class-level reference if not initialized in get_tokens_unprocessed, so init it in __init__ too * Fix: Fantasy markers are not allowed as components of other formulas, so have a dedicated check for them in the body of get_tokens_unprocessed which disables the normal formula handling if present * Clarify TNTLexer.lineno docstring * Attempt to discard tokens before an IndexError +tests/test_tnt.py: * Test every method, and test both +ve and -ve matches for most * Lexer fixture is test-level to reinitialize cur clean each time * Don't test actual get_tokens_unprocessed method (besides for fantasy markers) because the text testing is left to examplefiles AUTHORS: + Add myself to credits :) * Add a TNT test just to make sure no crashes
Diffstat (limited to 'tests/examplefiles/exampleScript.cfc')
0 files changed, 0 insertions, 0 deletions