summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Update CHANGES.Matthäus G. Chajdas2021-03-141-0/+1
| |
* | Added ThingsDB Language support (#1295)Georg Brandl2021-03-146-0/+656
| | | | | | | | | | | | | | | | | | | | | | | | * Added ThingsDB Language support * Update ThingsDB language * add comments to syntax * Update to new test system. Co-authored-by: Jeroen van der Heijden <joente@gmail.com> Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
* | Add KuinLexer (#1300)Georg Brandl2021-03-145-0/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add KuinLexer * Add golden test output. * Update mapfiles. * Update URL. * Fix regex lint failures. Co-authored-by: tatt61880 <tatt61880@gmail.com> Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
* | Update CHANGES, versionadded.Matthäus G. Chajdas2021-03-143-2/+6
| |
* | Add apdl and gcode lexers (#1714)Averter2021-03-1411-0/+2425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add apdl and gcode lexers * Added requested changes except words function * Added requested changes except words function * Added words function to handle lists of keywords * Add two testing example files * Delete two_dimensional_truss.ans * Delete coupled_example.ans * Create example1apdl.ans * Create example2apdl.ans * General cleanup of apdlexer and creation of mapfiles * Escaped backslashes in string literals on apdlexer * Removed backslashes. None was necessary in the first place * Added apdl aliase and a * based command in the test file * Forgot to create the map files * Tested version. Also removed an unused function from apdlexer * Added examples for gcode and golden output * Trimming of gcode files to a few dozens of lines * Removed duplicates from elafunb
* | Update the Chapel lexer (#1743)Engin Kayraklioglu2021-03-142-60/+84
| | | | | | | | | | | | | | | | | | * Update the Chapel lexer Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com> * Update the test Signed-off-by: Engin Kayraklioglu <e-kayrakli@users.noreply.github.com>
* | Refactor CFamilyLexer (#1746)amitkummer2021-03-142-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove duplicate lines in state * Refactor ident regex for readability Refactor ident regex changed in c1a0d82 to improve readability. Refactor namespaced_ident regex added in c1a0d82 to improve readability. * Fix inline keword lexing * Fix indentation * Refactor CLexer keywords to 'keywords' state
* | Update command to indeed include line numbers (#1745)Rafael Rossi2021-03-111-1/+1
| | | | | | Command was not including the line numbers, missing `linenos=1` option.
* | Update CHANGES.Matthäus G. Chajdas2021-03-061-1/+1
| |
* | Minted compatibility patch (#1737)Jean-François B2021-03-061-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #1735 pull request * LaTeX: workaround to ensure compatibility with minted This reverts already merged #1735 (after a commit from #1736 to fix it) and applies the first envisioned method discussed in #1734. The reason is that the #1735-#1736 method only partially repairs the minted compatibility. Minted queries from Pygments the stylesheet with a command prefix equal to the style name, which may contain (at least, so far) characters such as - and _, which are not normally allowed in LaTeX macros. So it modifies the meaning of - and _ before telling LaTeX to input the Pygments provided stylesheet. Restoring the normal meaning of - from inside the stylesheet must be carefully localized: at top and bottom of stylesheets some macros will use in their names the - and there the - must be the weird minted one, not the normal one. The #1735-#1736 method thus does fix compatibility with minted but *only* for those style names not using a -, but it creates another issue if used with e.g. style "paraiso-dark" which has a - character in its name. "De guerre lasse", I feel it is simpler to use the somewhat strange very localized hotfix of prefixing - by \string at the one spot where we need it to be its normal self. Hence this PR. Fix #1734.
* | Update CHANGES.Matthäus G. Chajdas2021-03-051-1/+2
| |
* | LaTeX: workaround minted incompatibility with Pygments 2.8.0 (#1735)Jean-François B2021-03-051-0/+5
| | | | | | | | | | | | Fix: #1731 Fix: #1734 Upstream issue: https://github.com/gpoore/minted/issues/294
* | use `id` not `name` for line anchors; (#1725)Cyker Way2021-03-052-4/+4
| | | | | | | | | | | | | | | | | | | | | | * use `id` not `name` for line anchors; `name` attribute on `a` element is obsolete in html5; * keep `name` to remain compatible with existing code; * update docstring; * update test files;
* | Update CHANGES.Matthäus G. Chajdas2021-03-051-0/+1
| |
* | Rust: accept lone hashes as they can appear in macro argumentsGeorg Brandl2021-03-051-0/+5
| | | | | | | | fixes #1061
* | Clarify hl_lines usage (fixes #959.)Matthäus G. Chajdas2021-03-051-1/+3
| |
* | Fix #853.Matthäus G. Chajdas2021-03-052-2/+3
| | | | | | | | Add bint, Py_ssize_t.
* | nitsGeorg Brandl2021-03-052-5/+5
| |
* | Update CHANGES.Matthäus G. Chajdas2021-03-052-0/+14
| |
* | Add formatter for Pango Markup (#1727)Philipp Imhof2021-03-054-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add formatter for Pango Markup * Code style improvement * Code improvement + test case * Changed test * retrigger checks * Make test independent of color style
* | Update lists of operators/keywords in Julia and expand/refine highlighting ↵jmert2021-03-0514-11000/+3968
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1715) * [julia] Update operators, keywords, and literal lists * [julia] Support symbol macros * [julia] Parse '..' operator juxtaposed with integers * [julia] Identify Symbol literals * [julia] Consume strings/commands faster & add triple-quoted command * [julia] Support identifying operators with custom suffixes * [julia] Add parsing for raw strings * [julia] Share definition of interpolation * [julia] Identify escaped ` and $ in commands * [julia] Support non-standard string and commmand literals with flags * [julia] Support variable names with interior exclamations * [julia] Fix matching floats starting with decimal * [julia] Compress nearly duplicate number matches with optional group * [julia] Match double-underscored float literal * [julia] Match hex float literals * [julia] Test more non-numerical literal expressions * [julia] Tag types in type contexts * [julia] Identify console via `julia-repl` as well * [julia] Be more conservative in identifying symbols * [julia] Update example file to v1.6 `base/strings/string.jl` * Address one CI failure * Switch to non-emoji Unicode category So example Hopefully fixes pypy3 CI failure * fixup: remove duplicate operators already in DOTTED_OPERATORS_LIST * [julia] Fix backslash operator * [julia] List `true`, `false` with builtin names, not keywords
* | Fix typo in keywords of SquidConfLexer. (#1730)Sardorbek Imomaliev2021-03-031-1/+1
| | | | | | cahce_replacement_policy -> cache_replacement_policy
* | octave: also allow percent block commentsGeorg Brandl2021-03-012-2/+18
| |
* | octave: add multiline commentsGeorg Brandl2021-03-012-7/+32
| | | | | | | | fixes #1726
* | Rewrite Scala lexer for Scala 3 (#1694)Maxime Kjaer2021-03-0174-553/+6083
| |
* | Fixes for C and C++ functions and namespaces (#1722)amitkummer2021-02-2716-185/+2006
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix lexing of function names This fixes #1561. Add a keywords state that matches inside and outside functions for keywords. Before this, when a keyword would appear the lexer would go to the statements state, in which functions were not matched. * Add tests for lexing of function names * Unbreak previous tests * Allow namespaced names in function statements Add a second identifiers regex that matces all the previous identifiers and also '::'. I took the decision to create a second identifiers regex with '::' inside, simply because using the old identifiers regex would hurt performance massively on every solution I tried to craft. * Add tests for namespaced names in functions * Unbreak previous tests * Add support for namespaces in namespace declarations Add a namespace state that is entered each time the namespace keyword is matched and lexes all name matches as namespaces. Cases this approach doesn't cover: * Namespaces in using declarations. * Namespaces that prefix names in random code. Unfortunately, in both of these cases the names before and after '::' are not always namespaces. * Add tests for namespace declartions * Unbreak previous tests * Tidy functions regex Remove group nesting that became unneeded after fc56ab8 (the last big refactor). * Remove f string usage I introduced by mistake
* | Two updates for the Coq lexer (#1721)Maximilian Wuttke2021-02-231-2/+4
| | | | | | | | | | | | | | | | * Coq: Add `Abort`,`Admitted`, `SProp` * Coq lexer: add unicode notations defined in the standard library Also comment out Π and Σ, since these notations are not defined in the standard library.
* | Fix link to graphviz project (#1716)Kamil Breguła2021-02-151-1/+1
| |
* | minor formatting fixups for new lexersGeorg Brandl2021-02-145-14/+16
| |
* | Update CHANGES post 2.8.0 release.Matthäus G. Chajdas2021-02-141-0/+4
| |
* | Update setup.cfg.2.8.0Matthäus G. Chajdas2021-02-142-19/+19
| | | | | | | | | | | | Putting the description text inline causes an issue with Twine, seemingly due to how leading whitespace is handled. Moving it into a separate file fixes the problem.
* | Prepare 2.8.0 release.Matthäus G. Chajdas2021-02-141-1/+1
| |
* | Fix various issues found by make check.Matthäus G. Chajdas2021-02-149-18/+29
| |
* | Update CHANGES.Matthäus G. Chajdas2021-02-141-8/+35
| |
* | Add futhark lexer (#1691)Philip Munksgaard2021-02-144-0/+366
| |
* | Merge branch 'master' of https://github.com/pygments/pygmentsMatthäus G. Chajdas2021-02-1476-236/+6127
|\ \
| * | RawToken{Formatter,Lexer}: support Python 3 and handle exceptions (#1602)Anders Kaseorg2021-02-144-24/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, RawTokenFormatter would output non-ASCII for non-ASCII input, and RawTokenLexer would throw Unicode-related exceptions for ASCII or non-ASCII input; fix them. Also, handle all exceptions, so that callers who find RawTokenLexer via get_lexer_by_name on user input don’t unexpectedly get a lexer that throws exceptions. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
| * | image formatter supports background color (#1374)Hector Medina2021-02-141-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Extend Image formatters in img.py to support background colors. * New function to get the background color for a given token type, optionally None * The self.drawables list used the fill keyword, stuffed into a **kwrgs, for the color of the token; since tokens can have foreground and background colors, that list now uses two explicit names, passing one to the PIL/Pillow text draw call, the other to the rectangle draw call. * When iterating over the `drawables` list, the presence of a background color triggers the drawing of a rectangle beneath the text. * Dimensions of background rectangle calculated by PIL based on the rendered text and font. * If input string is multiline, PIL will use multiline for draw and size internally.
| * | Provide (all?) Matlab built-ins (#1705)Alex Povel2021-02-147-51/+2578
| | | | | | | | | | | | | | | | | | | | | * Add (all?) Matlab built-ins See also https://de.mathworks.com/help/matlab/referencelist.html * Adjust pytest goldens
| * | Add CDDL lexer (Fix #1239) (#1379)Thomas Duboucher2021-02-146-0/+3237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add CDDL lexer (thanks to Fabian Neumann) * Add CDDL to mappings * Fix inline flag in CDDL regex * Update AUTHORS * Fix explosive backtracking * Comment invalid CDDL syntax for automated tests * Update following Georg Brandl's review * Update tests for CDDL to new framework * Pylint pass * Update links to CDDL RFC * Update copyright header * Solve regexlint issues in CDDL parser * Add link to CDDL in documentation
| * | Fix/1698 lineos wrapping (#1701)Matthäus G. Chajdas2021-02-1252-132/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #1698. * Change default line number styling. Instead of hardcoding black/light gray, use transparent/inherit which makes it "neutral" out of the box. linenospecial is still hard-coded and may look wrong, but that needs fixing in the style. * Prettify the test files. * Fix incorrect wrapping of TD linenos. The padding would get applied twice to "special" lines, once via <pre>, once via the <span>, which was not consistent with inline line numbers where the .special style would override the default style. To fix this, we now emit "normal" and "special" lines for td.linenos line numbers, and the normal style is applied to "normal". This brings td.linenos closer to inline line numbers, and also makes the styling between noclasses=True and noclasses=False consistent. * Document the line number styling changes.
| * | Fix CBM BASIC V2 analyze text logic (#1607)Carlos Henrique Guardão Gandarez2021-02-124-17/+19
| | |
| * | fix ecl analyze text logic (#1610)Carlos Henrique Guardão Gandarez2021-02-122-2/+16
| | |
| * | LaTeX: avoid uneven baselines in case highlighting uses \fcolorbox (#1708)Jean-François B2021-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, the \strut causes the background color to apply to a full baseline height, then the framing done by \fcolorbox augments beyond that the box height and as a result the line where this happens will have extra distance from previous and next lines. Correct that by reducing the apparent box size by exactly the width of the frame (\fboxrule). Also, make the change to \fboxsep local. Reason: if texcomments is True, some arbitrary LaTeX mark-up can be executed in a later part and the setting of \fboxsep could modify output; macro \<cmdprefix>@bc is executed at top level, cf. \<cmdprefix>@do.
| * | Fix eiffel regex performance (#1658)Dave Brondsema2021-02-121-1/+1
| | |
| * | LaTeX: keep scope of \fboxsep local (#1709)Jean-François B2021-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | In case of texcomments=True or usage of escapeinside, arbitrary LaTeX can be executed. The \PY@bc is executed at top level hence should not set \fboxsep at this level but keep the change to a local scope. There is another instance but it is part of PR #1708
| * | LaTeX: use \@namedef (refactoring) (#1710)Jean-François B2021-02-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ latexdef @namedef \@namedef: macro:#1->\expandafter \def \csname #1\endcsname And the @ character is usable here in macro names (the variable with name definition is authorized to contain for example \PY@it) This makes the output shorter. It makes for a neater sphinxhighlight.sty...
| * | LaTeX: \catcode assignment should be terminated (#1711)Jean-François B2021-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is almost irrelevant. But \catcode`\_=8 without termination might let LaTeX expand prematurely its token stream. Of course here in the context of fancyvrb.sty chances are 99.99% that what comes next does not expand or expands safely. I did not look in code. Only a matter of style, to be on the safe side.
| * | Updated _cocoa_builtins.py with types from iOS 14.4 SDK (#1703)Filip Němeček2021-02-121-10/+15
| | | | | | | | | | | | | | | * Updated _cocoa_builtins with types from iOS 14.4 SDK * Added continue to the except block
* | | Merge branch 'kurtmckee-issue-253-ruby-unicode'Matthäus G. Chajdas2021-02-143-17/+68
|\ \ \ | |/ / |/| |