| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Update CHANGES, bump version.
|
| |
|
|
| |
This removes the top/bottom padding changes, and only keeps left/right
padding, in the hope that this does not break all Sphinx themes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@belett noticed that VALUES was missing [1]; I found the other ones by
running the following snippet on the SPARQL 1.1 Query Language spec:
new Set(Array.from(document.querySelectorAll('.grammarTable'))
.reduce((text, elem) => text + elem.textContent)
.match(/'[a-z0-9-_ ]*'/ig))
I don’t know why a few keywords were missing; the docstring linked to
the SPARQL 1.0 Query Language spec (also fixed here), but the lexer
already contained other tokens which were only added in SPARQL 1.1, such
as the aggregate functions (MIN, MAX etc.), which have already been in
Pygments since the initial commit of the current history (6ded9db394).
[1]: https://phabricator.wikimedia.org/T264175
|
| |
|
|
|
|
|
| |
* Fix LatexEmbeddedLexer to not call the nested tokenizer piecewise
* Reuse the existing do_insertions function
* Add a test for the `LatexEmbeddedLexer`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add analyze_text to make make check happy.
This also fixes a few small bugs:
* Slash uses *.sla as the file ending, not *.sl
* IDL has endelse, not elseelse
* Improve various analyse_text methods.
* Improve various analyse_text methods.
* Make Perl less confident in presence of :=.
* Improve brainfuck check to not parse the whole input.
* Improve Unicon by matching \self, /self
* Fix Ezhil not matching against the input text
* Simplify Modula2::analyse_text.
|
| | |
|
| |
|
|
| |
fixes #1223
|
| |
|
|
| |
fixes #1548
|
| |
|
|
| |
Fixes #1544
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* all: remove "u" string prefix
* util: remove unirange
Since Python 3.3, all builds are wide unicode compatible.
* unistring: remove support for narrow-unicode builds
which stopped being relevant with Python 3.3
|
| |
|
|
|
|
|
| |
PyPy3 on Windows has a test failure in `test_cmdline:test_outfile()`
when trying to unlink the temporary output file. The root cause is that
`cmdline:inner_main()` does not explicitly close the file that it opens,
and PyPy3 isn't auto-closing the file when `inner_main()` returns.
This prevents the file from being unlinked, and the test case fails.
|
| | |
|
| |
|
|
| |
as advised in https://github.com/pygments/pygments/pull/1535/files/f581f2892154e8e4ed673ab940abf8af43ebe66b#r484028618
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Remove support for single-quoted strings.
Update fennelview example to latest version of library.
|
| |
|
|
| |
... which is not equivalent in Unicode mode
|
| | |
|
| | |
|
| |
|
|
| |
Add a quick reminder that Javascript doesn't need integers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename the "Javascript" tests to reflect that they are for CoffeeScript
This change also modifies the module docstring to reflect the file's purpose.
* Overhaul the Javascript numeric literal parsing
Fixes #307
This patch contains the following changes:
* Adds 50+ unit tests for Javascript numeric literals
* Forces ASCII numbers for float literals (so, now reject `.୪`)
* Adds support for Javascript's BigInt notation (`100n`)
* Adds support for leading-zero-only octal notation (`0777`)
* Adds support for scientific notation with no significand (`1e10`)
Numeric literal parsing is based on information at:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Overhaul the MySQL lexer
Fixes #975, #1063, #1453
Changes include:
Documentation
-------------
* Note in the lexer docstring that Oracle MySQL is the target syntax.
MariaDB syntax is not a target (though there is significant overlap).
Unit tests
----------
* Add 140 unit tests for MySQL.
Literals
--------
* Hexadecimal/binary/date/time/timestamp literals are supported.
* Integer mantissas are supported for scientific notation.
* In-string escapes are now tokenized properly.
* Support the "unknown" constant.
Comments
--------
* Optimizer hints are now supported, and keywords are
recognized and tokenized as preprocessor instructions.
* Remove nested multi-line comment support, which is no
longer supported in MySQL.
Variables
---------
* Support the '@' prefix for variable names.
* Lift restrictions on characters in unquoted variable names.
(MySQL does not impose a restriction on lead characters.)
* Support single/double/backtick-quoted variable names, including escapes.
* Support the '@@' prefix for system variable names.
* Support '?' as a variable so people can demonstrate prepared statements.
Keywords
--------
* Keyword / data type / function are now in a separate, auto-updating file.
* Support 25 additional data types (including spatial and JSON types).
* Support 460 additional MySQL keywords.
* Support 372 MySQL functions.
Explicit function support resolves a bug that causes non-function
items to be treated as functions simply because they have a trailing
opening parenthesis.
* Support exceptions for the 'SET' keyword, which is both a datatype and
a keyword depending on context.
Schema object names
-------------------
* Support Unicode in MySQL schema object names.
* Support parsing of backtick-quoted schema object name escapes.
(Escapes do not produce a distinct token type at this time.)
Operators
---------
* Remove non-operator characters from the list of operators.
* Remove non-punctuation characters from the list of punctuation.
* Cleanup items based on feedback
* Remove an unnecessary optional newline lookahead for single-line comments
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Add support for ARM constant notation in GAS lexer
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GNU supports ARM syntax which uses notation like #1 for constants.
Currently this is handled like a comment which is incorrect.
Take the case of:
ldr r0, [r1, #0]
Right now the #0] would be treated like a comment and looks
very poor.
Was referenced in issue #627
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
|
| |/
|
|
|
| |
This lexer is based on the PythonConsoleLexer and provides the ability
to highlight console input and output for PsySH, a developer console and
REPL for PHP. See https://psysh.org.
|
| |
|
|
|
| |
* more explicitly define escape sequencies in JsonLexer (fix #1065)
* adding test coverage for #1065
|
| | |
|
| |
|
|
|
| |
According to [RFC7540 (section 3.5)](https://tools.ietf.org/html/rfc7540#section-3.5), if I interpret it correctly, it actually even _has to_ start with `2.0` and not `2`.
As HTTP/3 is also defined there, I have not looked into how that has to be used/started.
|
| |
|
|
|
|
|
|
|
| |
* Fixed guessing of CMake by header.
* Version number can have multiple digits.
* Tabs are handled as white space.
* Trailing comments are ignored.
* Cleaned up regex to detect CMake header.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add lexer for pointless
* lexer docstring formatting
* added link to languages doc
* update authors
* update version
* added double string
* added upval keyword
* simplify ptls example code
* rename doubleString -> multiString
|
| |
|
|
|
| |
Single-quoted strings were handled differently in the Ruby lexer
compared to double-quoted strings, leading to catastrophic backtracking.
|
| | |
|
| |\
| |
| |
| |
| | |
Noordsestern/Noordsestern-robotframework-tasks-table
[Robot Framework] Add syntax for tasks
|
| | | |
|
| | | |
|
| | |
| |
| | |
available since Robot Framework 3.1 (January 2019)
|
| |\ \
| | |
| | | |
Improve HTML formatter output.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the previous changes, we started to emit one <pre> per line for
line numbers. This breaks for instance the Sphinx-RTD-Theme, which
expects the line numbers to be formatted the same way as the normal
content. This commit makes the following changes:
* Emit a single <pre> inside the linenos div
* Wrap individual lines into <span> as needed
* Update all tests
* Don't yield empty <span> elements when no style is specified
This also makes the .html test files look correct when looked at with a
browser, as there is no extra whitespace in them which needs stripping.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This is a manual merge as we don't want to pull in the documentation
change as part of this fix for a cleaner history.
|