summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Improve HTML formatter output.improve-linenos-handlingMatthäus G. Chajdas2020-07-3165-836/+712
| | | | | | | | | | | | | | | 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.
* Fix Arrow lexer module docstring (#1499)Ken2020-07-301-1/+1
| | | oops...
* Improve Markdown lexer (#1495)Leistungsabfall2020-07-212-21/+557
| | | | | | | | | | | | | | | | | | | | | * Add support for Setext-style headings in Markdown * Improve inline code detection in Markdown * Add support for indented code blocks in Markdown * Improve italics & bold detection in Markdown * Simplify italics & bold regexes in Markdown * Add warning about possible unrecognized internal tags in Markdown * Improve striktethrough detection in Markdown * Small bugfix in Markdown * Small bugfix in Markdown * Small refactoring in Markdown
* Fix Solarized line number colors (#1477)Paweł Fertyk2020-07-0471-129/+1223
| | | | | | | | | | | | | | | | | * Add font and background colors to Style * Move all styles to get_style_defs, add tests * Remove hardcoded styles, add special lineno style * Add styles for special line numbers in tables * Update noclasses documentation * Refactor linenos elements and styles, add tests * Update AUTHORS * Fix multiple CSS prefixes, add tests
* Add support for PowerShell Remoting sessions (#1398)Geert Smelt2020-06-302-2/+30
| | | | | | | | | | | * Add support for PowerShell Remoting sessions * Add test case for PowerShell Remoting sessions * Make whitespace after prompt optional * Fix test case containing backslashes * Add test case for local PowerShell sessions
* Add Arrow lexer (#1481)Ken2020-06-213-0/+176
| | | | | | | * Add Arrow lexer * Pass tests: raw string for regex * Make requested changes
* Merge pull request #1478 from cool-RR/2020-06-11-raise-fromGeorg Brandl2020-06-201-3/+3
|\
| * Fix exception causes in lexer.pyRam Rachum2020-06-111-3/+3
|/
* Improve SystemVerilog class/endclass lexer rules (#1471)Chris Drake2020-06-062-8/+103
| | | | | | | | | | | The class looks like: class class_identifier [#(param_decls)] [extends class_identifier #(params)]; ... endclass [: class_identifier] Using the same Java convention of Keyword.Declaration and Name.Class. Add a test_systemverilog_classes unit test to test_hdl.
* Updated languages list with more links (#1472)Rys Sommefeldt2020-06-031-129/+129
|
* Remove .vscode folder.Matthäus G. Chajdas2020-06-022-6/+1
| | | | | This was added by accident, shouldn't be there. Added to ignore file as well.
* Update CHAGES, language list.Matthäus G. Chajdas2020-06-012-2/+8
|
* add Singularity lexer (#1285)Georg Brandl2020-06-013-2/+81
| | | Co-authored-by: Bryton Hall <email@bryton.io>
* Nasm: Update register syntax for 64-bit (#1465)Jonas Bushart2020-06-011-1/+1
| | | | | | | x86_64 has 8 registers r8-r15. The current syntax only accepts them with a trailing letter. The letter is used to indicate the register size. However, r8 is also a valid register, for a 64 bit wide register. For reference on the register names see https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html
* SystemVerilog keyword/operator improvements (#1464)Chris Drake2020-06-012-14/+269
| | | | | | | | | | | | | | | | | | | | | | | | | * Move SystemVerilog type keywords Put them next to the generic keywords list. * Change a couple SystemVerilog keywords to operators The 'inside' and 'dist' keywords are described as operators in the SystemVerilog standard, below unary increment/decrement, and above concatenation in precedence. See 1800-2017 tables 11-1 and 11-2 for a list of operators. This matches the description of pygemnts Operator.Word token: "For any operator that is a word (e.g. not)." * Add a SystemVerilog operators unit test Copy/paste the contents of 1800-2017 Table 11-2, and see what the SV lexer chops it up into. I made lots of comments for potential improvements. Some operators, such as '[' and '.' are being labeled as punctuation. Also, multi-character operators such as '<<<=' are being split up into multiple, single-character tokens, eg '<' '<' '<' '='.
* add myself as author of the TiddlyWiki5 lexer (#1469)Max2020-06-011-0/+1
|
* Use the checkout@v2 action.Matthäus G. Chajdas2020-06-011-2/+2
|
* Use python3 in Makefile (fixes #1440.)Matthäus G. Chajdas2020-06-011-1/+1
| | | | | | We only support python3, and various OS still have python point to python2. Setting python3 as the default allows us to run some operations like make mapfiles without having to enter a virtual environment.
* Add GDScript lexer (#1457)Paweł Fertyk2020-06-017-2/+639
| | | | | | | | | | | | | | | | | | | | | * Added GDScript lexer * Fix regular expressions in GDScript lexer * Update GDScript lexer with the current version from Godot docs * Add tests for GDScript lexer * Update authors * Add an example file for GDScript * Implement analyze_text for GAP and GDScript * Fix example file name in tests * Update license Co-authored-by: Daniel J. Ramirez <djrmuv@gmail.com>
* Merge pull request #1467 from EmreAtes/masterGeorg Brandl2020-05-291-2/+7
|\ | | | | Added separate lifetime lexing for Rust
| * Added separate lifetime lexing for RustEmre Ates2020-05-291-2/+7
|/
* Merge pull request #1442 from amanotk/masterGeorg Brandl2020-05-271-4/+4
|\
| * fixed fortran literal regex patternTakanobu Amano2020-05-051-4/+4
| |
* | Merge pull request #1463 from cjdrake/refactorGeorg Brandl2020-05-271-250/+252
|\ \
| * | Refactor SystemVerilog unit testsChris Drake2020-05-261-250/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the contents of these two unit tests are static. Move things around so the entire test fits on a single page, for better readability/maintainability. Name the code part <TEST_NAME>_TEXT, and the tokens part <TEST_NAME>_TOKENS. Choosing "text" b/c it's the parameter name to the lexer.get_tokens(text) method.
* | | Merge pull request #1462 from cjdrake/fix-worGeorg Brandl2020-05-271-1/+1
|\ \ \ | |/ / |/| |
| * | Change Verilog 'wo' to 'wor'Chris Drake2020-05-261-1/+1
|/ / | | | | | | | | There is no 'wo' keyword. This was probably supposed to be 'wor', short for "wired OR".
* | Update CHANGES.Matthäus G. Chajdas2020-05-261-0/+1
| |
* | Update `Inform6Lexer` to Inform 6.34 (#1461)David Corbett2020-05-262-19/+29
| |
* | Update CHANGES, documentation.Matthäus G. Chajdas2020-05-262-1/+7
| |
* | Add lexer for Devicetree language (#1434)Maxime Chretien2020-05-264-0/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lexer for Devicetree language Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com> * Devicetree lexer: fix random input test error Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com> * Devicetree lexer: fix example file reference Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com> * Devicetree lexer: Reduce example file size Also add some missing language elements Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* | Update CHANGES.Matthäus G. Chajdas2020-05-261-1/+1
| |
* | Update SystemVerilog literal constants (#1460)Chris Drake2020-05-262-14/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original implementation was missing some of the more arcane features such as underbars, the character 's' for signed/unsigned, support for spaces before/after the base specifier, capital letter base specifiers (ie 'B 'D 'H), and the 4-state 'xXzZ?' characters. For regular integers, the 'l' and 'L' suffixes are not valid. That is, unlike C, in Verilog '42L' is not a valid int literal. Create a new test that exercises most of the interesting kinds of SystemVerilog numbers. This fixes a couple minor issues with what type of number the lexer returns. For example, Numbers like '42' used to return Integer.Hex, but now return Integer.Decimal.
* | Update CHANGES.Matthäus G. Chajdas2020-05-241-0/+2
| |
* | Add support for .tid files (TiddlyWiki5) (#1390)Max2020-05-243-1/+233
| | | | | | | | | | | | | | | | | | | | | | * add support for .tid files (TiddlyWiki5) * add lexers/_mapping.py * markup.py: change versionadded of TiddlyWiki5Lexer to 2.7 * markup.py, TiddlyWiki5Lexer: use non-greedy matcher for table headers, footers, captions and classes * markup.py, TiddlyWiki5Lexer: make timestamps of type Number.Integer
* | Update CHANGES.Matthäus G. Chajdas2020-05-221-1/+1
| |
* | Merge branch 'master' of https://github.com/pygments/pygmentsMatthäus G. Chajdas2020-05-222-28/+32
|\ \
| * | Fix a few SystemVerilog type keywords (#1454)Chris Drake2020-05-222-28/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix a few SystemVerilog type keywords First, add a few missing type keywords: chandle, const, event, string, time, type, var, void These are most of the 'variable' types listed in 1800-2017 6.8 "Variable declarations". Currently, this 'Keyword.Type' is not taking effect because the lexer is finding these keywords in the 'Keyword' list above. Remove the double declaration so we get the more specific token type. * Change signed/unsigned to Keyword.Type This is what the C/C++ lexer does, so it seems legit.
* | | Update CHANGES, simplify analyse_text.Matthäus G. Chajdas2020-05-223-1/+7
|/ /
* | Update the Tera Term macro lexer (new 'setspeed' command) (#1337)Kurt McKee2020-05-221-46/+226
| |
* | Update CHANGES.Matthäus G. Chajdas2020-05-221-0/+2
| |
* | General improvement to the C/C++ lexer (#1350)Hubert Gruniaux2020-05-223-41/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * General improvement to the C/C++ lexer * Add missing C11 keywords Add '_Imaginary', '_Static_assert', '_Atomic' keywords. * Highlight C11 std atomic types (#906) Add support for C11 atomic types `atomic_*`. * Extended character literals prefixes for C/C++ Add support for `u'a'`, `U'a'` (C++11, C11), and `u8'a'` (C++17, C2x). [Reference](https://en.cppreference.com/w/cpp/language/character_literal). [Reference](https://en.cppreference.com/w/c/language/character_constant). * Fix bad floating point highlighting in C lexer Fix bad highlighting for `5.`, where `.` was not highlighted. * Fix hex floating literal highlighting in C Hexadecimal floating point literals needs an exponent (`0x5p8`). Before this commit, event floating-point literals without an exponent were accepted (e.g. `0x5.5`). * Support '$' in identifiers, C/C++ Some old C/C++ compilers have supported `$` (dollar sign) in identifiers, and some news continue to support this for legacy reasons. That is, some codes may use them, and it is therefore preferable to color them correctly. * Cleaning and fixing some bugs in C/C++ lexer - Add '_Pragma' keyword - Recognize the identifier following 'typename' as Name.Class - Do not tokenize 'class' or 'struct' following 'enum' as Name.Class, but instead as Keyword (C++ lexer) - Move some C++ keywords to the generic lexer (`alignas`, `alignof`, etc...) - Add some C keywords (`noreturn`, `imaginary`, `complex`) - And others things... * Fix building errors in C/C++ lexer * Fix bug in C/C++ Now `class`, `struct`, `enum`, `union`, etc... can be used alone. Previously, the lexer do not recognizes them if they are not followed by an identifier. This regression was introduced in https://github.com/pygments/pygments/pull/1350/commits/013bf6af2777f6ba444e2c8e3a8ca3ad1bb1e674 by me. * Reuse old states names for C/C++ Some lexers depends on the old states names (e.g. `classname` state) to works. This commit, reintroduce these old names. * Improve C/C++ lexer documentation * Correct english errors in C lexer documentation * Cleaning and Unicode literals for C * Move Unicode literals from C++ to generic C * Remove useless 'classname' state in ECLexer * Revert "Remove useless 'classname' state in ECLexer" This reverts commit 89a0c138fbcc70883d8035b0585b7e94e49f73cc. * Revert "Revert "Remove useless 'classname' state in ECLexer"" This reverts commit 2d4734308a813abec6a17ea7fa6eb3a0b6f57939. * Add support for UCNs in C and C++ * Apply correction from #1162 Solves #1162 * Correctly highlights negatives numbers in C++ * Revert some changes from 8fe8ed6 * Add unicode suffixes to C++ raw string literals * Solves #1166 * Fix previous regression in C like lexer * Fix invalid regex in C like lexer * Fix #1396 and now are identifiers support UCNs in C and C++ lexer * Update AUTHORS * Add missing Python raw string prefix Co-authored-by: Hubert Gruniaux <42495291+HubertGruniaux@users.noreply.github.com>
* | Update CHANGES.Matthäus G. Chajdas2020-05-221-0/+11
| |
* | Configs lexer: Allow Kconfig derivate names (#1458)Maxime Chretien2020-05-202-2/+2
| | | | | | | | | | | | In the linux source code a lot of files are named Kconfig.debug and there are also other derivatives like Kconfig.x86 or Kconfig-nommu Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* | Make HttpLexer compatible with RFC 7230 (section 3.1.2). Specifically this ↵Joshua Huber2020-05-182-1/+15
| | | | | | | | addresses for the case where only a numeric HTTP status code is returned (eg. 200) and no textual reason phrase (eg. OK). Strictly according to RFC 7230, the whitespace just after the status code number is NOT optional, and in fact Tomcat 8.5 behaves this way, emiting status lines like "HTTP/1.1 200 \n" (note the whitespace after the 200). (#1432)
* | Add recent keywords for Dart syntax (#1449)Sam Rawlins2020-05-181-9/+10
| |
* | Add a basic SystemVerilog unit test (#1452)Chris Drake2020-05-181-0/+207
| | | | | | | | | | | | | | * Add a basic SystemVerilog unit test * Fix docstring Calling it a "complete fragment" didn't make much sense.
* | Python 3: remove "cmp" builtinGeorg Brandl2020-05-081-1/+1
| | | | | | | | fixes #1444
* | Matlabsession line continuation (#1399)Bryan W. Weber2020-05-062-16/+244
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * Add explicit line continuation for Matlab session Matlab lines can be explicitly continued with the ... syntax at the end of a line. In the Session lexer, this requires continuing to the next line to add more text. Otherwise, the next line is marked as output. * The ellipses in Matlab should be a Keyword The built-in Matlab syntax highlighter highlights ... with the same formatting as a keyword. Everything after that on the line should be a comment. * Update Matlab functions and keywords from R2018a * Fix many spaces in assignment formatted as string In command mode, MATLAB allows mutiple space separated arguments to a function which are interpreted as char arrays, and are formatted as Strings. This check was also catching cases where there were multiple spaces following an assignment or comparison operation and formatting the rest of the line as a string. Now, if an = or operator is found, the commandargs state is popped and control returns to the root state. * Add tests for MATLAB formatting
* Merge pull request #1441 from whitequark/verilog-escaped-identGeorg Brandl2020-05-041-0/+2
|\