summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Clarifying some documentation (#1928)Arthur Milchior2021-12-064-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NF: adding an example of use of simple filter @simplefilter is great, but also not very intuitive. Indeeds, the syntax seems to indicate that you define a function with four arguments while in reality you define a class whose constructor takes arbitrary keyword arguments. I believe in this case an example to show how to instantiate this filter is really necessary. Regarding simplefilter, I also believe that it could be improved in two simple ways: * accepting any method which takes lexer and stream as a filter. That would be sufficient as long as there is no option * the @simplefilter decorator could deal with `self` so that the user do not have to add it themselves. Probably not worth doing it no, as it would break compatibility with current version, but would be even simpler to use * NF: clarifying get_..._options get_bool_opt's documentation seems to indicate that the key is interpreted as a Boolean. While a quick look at the code shows clearly that the value associated to the key is what is interpreted as a Boolean. I hope I made the code clearer to any people who know python by indicating that it is essentially `.get` but with extra features * NF: clarifying Filter `filter` has already a specific behavior in general python, or for any people used to functional programing (and even if some dom processor). So indicating that a filter is not something that remove some tokens seems really useful to try to explain what is going on. * NF: adding details regarding states in lexer I found the state explanation confusing. I do know what a state machine is. However, reading the code, I first thought that there were two distinct variables: * the current state * the stack that are somehow related but distinct. Explaining that the current state is the top of the stack was lacking in my opinion. That also help explain #push. In particular that if you define in state "s" an operation whose new state is "#push", the behavior can be quite different than if the new state was "s".
* | Finish lexer implementation for SpiceMarc Auberer2021-12-051-0/+1
| |
* | Update CHANGES, language list.Matthäus G. Chajdas2021-11-281-0/+1
| |
* | Add support for BDD features / stories (#1803)xuan2021-11-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Create BDD.py Initialize the lexer file of BDD Add keywords of BDD * Update the 'RegexLexer' * Edit and test * Update BDD.py * Update BDD.py * Update the BddLexer file * Update the BddLexer of root tokens * edit bdd Add regular expression for tokens * edit bdd Add regular expression for tokens * add .gitignore * updata bdd.lexer * Delete bdd.py * Update the Keywords, Numbers, Punctuation token * bdd.py Assign different colors to keywords, punctuation, numbers, and variables. * Update the BddLexer file * Update bdd.py Fix the file name. * Add the detection for '@' Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com> * Update bdd.py Add detection of double quotes. Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com> * Fix the double quotes * fix the quote recognition * add comments * update the root dir * add bdd test cases * Delete .DS_Store * Delete .DS_Store * Delete .DS_Store * remove DS file * restore the gitignore file * update the bdd lexer * update the bdd lexer * update the whitespace highlight * update the whitespace highlight * refactor the bdd.py * update the punctuation * update the punctuation * update bdd token Change "." to the "\S+", Which reduce the test output file size. Co-Authored-By: OMGJL <8707895+OMGJL@users.noreply.github.com> * Update bdd.py Reduce the new token for each space Co-authored-by: Hongyuan Yan <hongyuan.yan@student.adelaide.edu.au> Co-authored-by: OMGJL <lzhsjunkmail@gmail.com> Co-authored-by: Hongyuan Yan <54675432+kirito330824@users.noreply.github.com> Co-authored-by: Jessie2110 <71688609+Jessie2110@users.noreply.github.com> Co-authored-by: Jessie2110 <wuqiong2110@gmail.com> Co-authored-by: OMGJL <8707895+OMGJL@users.noreply.github.com>
* | Fixes for LilyPond (#1968)Jean-Abou-Samra2021-11-212-14/+14
| | | | | | | | | | | | | | | | | | | | * LilyPond: update builtins to 2.23.4 * Doc: deduplicate LilyPond in language lists * Doc: exclude lilypond style from gallery Because it's specific to LilyPond code and doesn't give good results on Python code.
* | Various small cleanups.Matthäus G. Chajdas2021-11-211-0/+1
| |
* | Add lexer and style for LilyPond (#1845)Jean-Abou-Samra2021-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lexer and style for LilyPond GNU LilyPond is a text-based music typesetter. Because its concepts are completely different from programming languages, this adds a special-purpose to highlight the special tokens. The SchemeLexer is expanded to gain the ability of detecting when one expression stops. LilyPondLexer subclasses SchemeLexer. Builtins (the most important part) are generated with a script put in external/ (as was already done for Lasso). As part of this change, the CPSALexer is made no longer to inherit from SchemeLexer. The inheritance was unused anyway. * Fixup: translators names have underscores * Fixup: avoid duplicate builtins * Fixup: update goldens * Fixup: typo * Fixup: add missing tokens to style * Fixup: update lexer comments * Fixup: Tentative style adjustments * Fixup: move test file to examplefiles/ * Fixup: miscellaneous fixes (to be finished) * Fixup: escape all braces * Fixup: use Text, not Whitespace * Fixup: fixes for lexing and style * Fixup: update goldens! * Fixup: also test alist assignments * Fixup: recognize escape sequences in strings * Fixup: use Comment.Single * Fixup: Whitespace, not Text! * Fixup: fix pitch parsing * Fixup: update comment * Fixup: remove redundant re.UNICODE
* | Add lexer for the Savi language. (#1863)Joe Eli McIlvain2021-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | * Add lexer for the Savi language. * Updates based on review comments. * Prefer Text.Whitespace token over Text token for whitespace. * Updates to Savi lexer based on changes to Rouge Savi lexer. * Add versionadded identifier to Savi lexer.
* | Fix admonition-note styling.Matthäus G. Chajdas2021-11-211-2/+1
| |
* | Merge pull request #1956 from not-my-profile/sort-style-galleryMatthäus G. Chajdas2021-11-211-0/+10
|\ \ | | | | | | Sort styles in gallery by background luminance
| * | Sort styles in gallery by background luminanceMartin Fischer2021-11-141-0/+10
| | |
* | | demo: Sort options in lexer select (#1958)Martin Fischer2021-11-171-0/+1
|/ /
* | Promote styles meeting WCAG AA in styles gallery (#1954)Martin Fischer2021-11-142-18/+42
| | | | | | Part of #1718.
* | Restore pre background color on websiteMartin Fischer2021-11-042-0/+4
| | | | | | | | | | Was removed in 5a987b8af8dcbddcbd5cade37adebed5b5dd99f1 but that introduced unintended changes.
* | Fix broken link in documentationMartin Fischer2021-11-042-1/+6
| | | | | | | | Co-authored-by: Georg Brandl <georg@python.org>
* | Add styles gallery to website (#1943)Martin Fischer2021-11-046-6/+72
| |
* | Make pygments.org website responsive (#1942)Martin Fischer2021-11-036-12/+83
| |
* | Add documentation for missing CLI options (#1900)amitkummer2021-10-021-0/+40
| | | | | | Add documentation for the -N, -g, -s and --json command line options.
* | Update CHANGES.Matthäus G. Chajdas2021-08-081-0/+1
| |
* | Added Smithy Lexer (#1878) (#1879)Immanuel Washington2021-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added Smithy Lexer (#1878) * Added Smithy Lexer * Added Smithy Lexer auhtor * Documented Smithy as a supported language * Added Smithy test file and output * Updated Smithy Lexer * Added Standard file heading with copyright and license * Used `words` method for optimization, instead of bare regex * Specified whitespace punctuation in root * Updated aliases to only contain lowercase names to pass `test_basic_api` tests * Updated regexes lightly to fit regexlint rules (removing duplicate characters in group `-`) * Fixed regexes with errors in regexlint rules (Escaping brackets, gaps in capture groups) * Ran mapping script to fix build check * Ran mapping to update after changing aliases in previous commit
* | Add support for JSLT (#1821)João Abecasis2021-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | * Add support for JSLT JSLT is an open-source JSON query and transformation language, inspired by jq, XPath, and XQuery: https://github.com/schibsted/jslt. * fixup! Add support for JSLT * fixup! Add support for JSLT
* | Support error locations in Python tracebacks (#1852)Jean-Abou-Samra2021-07-061-0/+6
| | | | | | | | | | | | | | | | | | | | Support both single carets for syntax errors (Python 2 and 3) and fine-grained error locations with several carets (Python 3.11+). Previously, the carets were highlighted as operators. This uses a new token, Token.Punctuation.Marker. For now, no style supports it specifically. In the future, styles might start differentiating it from Token.Punctuation. [Closes #1850.]
* | Add procfile lexer (#1808)sblondon2021-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add Procfile Lexer * add unit tests for ProcfileLexer * add Procfile lexer author * Document Procfile as supported language * add Procfile.output file * merge Profile files; update output file * Add versionadded info * Fix typo (processus -> processes) * detect Integer only * split Text from Whitespace
* | Add Meson build language support (#1823)ldrumm2021-06-201-0/+1
| | | | | | | | | | | | | | | | | | * Add a Meson language lexer * update the mappings * Add meson to the list of supported languages * Add a meson.build example file
* | Support for OMG IDL (#1595)Fred Hornsey2021-05-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support for OMG IDL Lexer for [Object Management Group Interface Definition Language](https://www.omg.org/spec/IDL/About-IDL/). * Allow Whitespace Before include in C Preprocessor It wasn't highlighting the included filename the same as if there was no space before the include, but now it is. * Update omg-idl Tests to Latest Requirements * Update omg-idl versionadded to 2.9 Since I just realized this missed the 2.8 release. * Add Missing Operators to omg-idl
* | uniformize aliases order (#1780)Mestery2021-04-261-1/+1
| | | | | | | | | | * uniformize aliases order * LighttpdConfLexer: add lighttpd.conf filename
* | docs: move style development section to its own doc.Georg Brandl2021-04-163-76/+85
| | | | | | | | Reference: #1571
* | Fix capnproto URL (#1772)sblondon2021-04-121-1/+1
| |
* | faq: Add sourcehut (#1761)jgart2021-03-301-0/+1
| |
* | fix typo (#1762)jgart2021-03-301-1/+1
| |
* | Add NestedText lexer (#1578)Kale Kundert2021-03-211-0/+1
| | | | | | | | | | | | | | | | | | * Add NestedText lexer * Add NestedText to list of supported languages * Add some more test cases * Update tests.
* | 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.
* | Fix link to graphviz project (#1716)Kamil Breguła2021-02-151-1/+1
| |
* | Add CDDL lexer (Fix #1239) (#1379)Thomas Duboucher2021-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Add lexer for graphviz (#1657)Niklas Mollenhauer2021-02-071-0/+1
| | | | | | | | | | | | | | Imported from: https://github.com/nikeee/pygments-lexer-graphviz See: https://github.com/pygments/pygments/issues/731
* | update manpage with -g, -N, -CGeorg Brandl2021-01-211-2/+20
| |
* | Rename "tests/lexers" to "tests/snippets" and update the contributionGeorg Brandl2021-01-201-3/+3
| | | | | | | | docs to point to both snippets and examplefiles.
* | Also add auto-updatable output-based tests to examplefiles (#1689)Oleh Prypin2021-01-201-4/+6
| | | | | | Co-authored-by: Georg Brandl <georg@python.org>
* | Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* | doc: remove Perl 6 refGeorg Brandl2021-01-111-1/+0
| |
* | update pygments.rb URL to new home (#1669)Marat Radchenko2021-01-082-2/+2
| | | | | | see #1660
* | Bump copyright year.Matthäus G. Chajdas2021-01-033-3/+3
| |
* | doc/demo: add ability to highlight text given in url query; copy link featureGeorg Brandl2020-12-163-1/+50
| |
* | all: remove "u" string prefix (#1536)Georg Brandl2020-09-081-6/+6
|/ | | | | | | | | | | * 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
* all: use argumentless super()Georg Brandl2020-09-061-1/+1
|
* Update CHANGES and language list.Matthäus G. Chajdas2020-09-031-0/+1
|
* demo: rebuild WASM with every pushGeorg Brandl2020-09-012-5/+1
|
* demo: show Pygments version in useGeorg Brandl2020-09-012-0/+4
|
* Spell out that we want lexers in separate files.Matthäus G. Chajdas2020-08-231-1/+5
|
* docs: clarify cmdline invocation in lexer dev sectionGeorg Brandl2020-08-231-3/+6
| | | | closes #1518