From b40cc1e04e5328a9f017211a2ce6a0e106a52177 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 22:11:51 +0000 Subject: [PATCH] chore(deps): bump github.com/alecthomas/chroma/v2 from 2.23.1 to 2.24.1 Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.23.1 to 2.24.1. - [Release notes](https://github.com/alecthomas/chroma/releases) - [Commits](https://github.com/alecthomas/chroma/compare/v2.23.1...v2.24.1) --- updated-dependencies: - dependency-name: github.com/alecthomas/chroma/v2 dependency-version: 2.24.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 +- go.sum | 8 +- .../github.com/alecthomas/chroma/v2/COPYING | 99 ++++++ .../alecthomas/chroma/v2/Dockerfile | 2 +- .../github.com/alecthomas/chroma/v2/README.md | 14 +- .../v2/formatters/svg/font_liberation_mono.go | 2 +- .../chroma/v2/lexers/embedded/ampl.xml | 98 ++++++ .../chroma/v2/lexers/embedded/erb.xml | 37 +++ .../chroma/v2/lexers/embedded/gas.xml | 6 +- .../chroma/v2/lexers/embedded/gettext.xml | 24 ++ .../chroma/v2/lexers/embedded/graphql.xml | 4 + .../chroma/v2/lexers/embedded/javascript.xml | 2 +- .../chroma/v2/lexers/embedded/json.xml | 2 + .../chroma/v2/lexers/embedded/lateralus.xml | 184 +++++++++++ .../chroma/v2/lexers/embedded/lua.xml | 2 - .../chroma/v2/lexers/embedded/luau.xml | 173 +++++++++++ .../embedded/materialize_sql_dialect.xml | 2 +- .../chroma/v2/lexers/embedded/meson.xml | 1 + .../chroma/v2/lexers/embedded/mysql.xml | 2 +- .../chroma/v2/lexers/embedded/php.xml | 60 +++- .../chroma/v2/lexers/embedded/scdoc.xml | 115 +++++++ .../chroma/v2/lexers/embedded/spade.xml | 292 ++++++++++++++++++ .../chroma/v2/lexers/embedded/typescript.xml | 2 +- .../chroma/v2/lexers/embedded/xml.xml | 1 + .../alecthomas/chroma/v2/lexers/erb.go | 29 ++ .../github.com/alecthomas/chroma/v2/regexp.go | 6 +- .../alecthomas/chroma/v2/styles/api.go | 7 +- .../alecthomas/chroma/v2/styles/compat.go | 3 + .../alecthomas/chroma/v2/styles/darcula.xml | 83 +++++ .../chroma/v2/styles/github-dark.xml | 1 + .../chroma/v2/styles/kanagawa-dragon.xml | 83 +++++ .../chroma/v2/styles/kanagawa-lotus.xml | 83 +++++ .../chroma/v2/styles/kanagawa-wave.xml | 83 +++++ .../chroma/v2/styles/solarized-light.xml | 2 +- .../alecthomas/chroma/v2/tokentype_enumer.go | 201 ++++++------ .../github.com/alecthomas/chroma/v2/types.go | 6 +- vendor/github.com/dlclark/regexp2/README.md | 2 +- vendor/github.com/dlclark/regexp2/runner.go | 27 +- vendor/modules.txt | 4 +- 39 files changed, 1604 insertions(+), 152 deletions(-) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ampl.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/erb.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gettext.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lateralus.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/luau.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/scdoc.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/embedded/spade.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/erb.go create mode 100644 vendor/github.com/alecthomas/chroma/v2/styles/darcula.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-dragon.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-lotus.xml create mode 100644 vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-wave.xml diff --git a/go.mod b/go.mod index cb949fb..ad4cb04 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/cheat/cheat go 1.26 require ( - github.com/alecthomas/chroma/v2 v2.23.1 + github.com/alecthomas/chroma/v2 v2.24.1 github.com/davecgh/go-spew v1.1.1 github.com/go-git/go-git/v5 v5.16.5 github.com/mattn/go-isatty v0.0.20 @@ -18,7 +18,7 @@ require ( github.com/ProtonMail/go-crypto v1.3.0 // indirect github.com/cloudflare/circl v1.6.3 // indirect github.com/cyphar/filepath-securejoin v0.6.1 // indirect - github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/dlclark/regexp2 v1.12.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.7.0 // indirect diff --git a/go.sum b/go.sum index ad6b8e2..5be03db 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ github.com/ProtonMail/go-crypto v1.3.0 h1:ILq8+Sf5If5DCpHQp4PbZdS1J7HDFRXz/+xKBi github.com/ProtonMail/go-crypto v1.3.0/go.mod h1:9whxjD8Rbs29b4XWbB8irEcE8KHMqaR2e7GWU1R+/PE= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= -github.com/alecthomas/chroma/v2 v2.23.1 h1:nv2AVZdTyClGbVQkIzlDm/rnhk1E9bU9nXwmZ/Vk/iY= -github.com/alecthomas/chroma/v2 v2.23.1/go.mod h1:NqVhfBR0lte5Ouh3DcthuUCTUpDC9cxBOfyMbMQPs3o= +github.com/alecthomas/chroma/v2 v2.24.1 h1:m5ffpfZbIb++k8AqFEKy9uVgY12xIQtBsQlc6DfZJQM= +github.com/alecthomas/chroma/v2 v2.24.1/go.mod h1:l+ohZ9xRXIbGe7cIW+YZgOGbvuVLjMps/FYN/CwuabI= github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs= github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -23,8 +23,8 @@ github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= -github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2 v1.12.0 h1:0j4c5qQmnC6XOWNjP3PIXURXN2gWx76rd3KvgdPkCz8= +github.com/dlclark/regexp2 v1.12.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o= github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= diff --git a/vendor/github.com/alecthomas/chroma/v2/COPYING b/vendor/github.com/alecthomas/chroma/v2/COPYING index 92dc39f..33da489 100644 --- a/vendor/github.com/alecthomas/chroma/v2/COPYING +++ b/vendor/github.com/alecthomas/chroma/v2/COPYING @@ -17,3 +17,102 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// formatters/svg/font_liberation_mono.go + +Digitized data copyright (c) 2010 Google Corporation +with Reserved Font Arimo, Tinos and Cousine. +Copyright (c) 2012 Red Hat, Inc. +with Reserved Font Name Liberation. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/vendor/github.com/alecthomas/chroma/v2/Dockerfile b/vendor/github.com/alecthomas/chroma/v2/Dockerfile index c86b379..8a70676 100644 --- a/vendor/github.com/alecthomas/chroma/v2/Dockerfile +++ b/vendor/github.com/alecthomas/chroma/v2/Dockerfile @@ -1,7 +1,7 @@ # Multi-stage Dockerfile for chromad Go application using Hermit-managed tools # Build stage -FROM ubuntu:24.04 AS builder +FROM ubuntu:26.04 AS builder # Install system dependencies RUN apt-get update && apt-get install -y \ diff --git a/vendor/github.com/alecthomas/chroma/v2/README.md b/vendor/github.com/alecthomas/chroma/v2/README.md index 4aeb54d..d674769 100644 --- a/vendor/github.com/alecthomas/chroma/v2/README.md +++ b/vendor/github.com/alecthomas/chroma/v2/README.md @@ -36,25 +36,25 @@ translators for Pygments lexers and styles. | Prefix | Language | :----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -| A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, Agda, AL, Alloy, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, ArmAsm, ATL, AutoHotkey, AutoIt, Awk +| A | ABAP, ABNF, ActionScript, ActionScript 3, Ada, Agda, AL, Alloy, AMPL, Angular2, ANTLR, ApacheConf, APL, AppleScript, ArangoDB AQL, Arduino, ArmAsm, ATL, AutoHotkey, AutoIt, Awk | B | Ballerina, Bash, Bash Session, Batchfile, Beef, BibTeX, Bicep, BlitzBasic, BNF, BQN, Brainfuck | C | C, C#, C++, C3, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Ceylon, CFEngine3, cfstatement, ChaiScript, Chapel, Cheetah, Clojure, CMake, COBOL, CoffeeScript, Common Lisp, Coq, Core, Crystal, CSS, CSV, CUE, Cython | D | D, Dart, Dax, Desktop file, Diff, Django/Jinja, dns, Docker, DTD, Dylan | E | EBNF, Elixir, Elm, EmacsLisp, Erlang | F | Factor, Fennel, Fish, Forth, Fortran, FortranFixed, FSharp -| G | GAS, GDScript, GDScript3, Gemtext, Genshi, Genshi HTML, Genshi Text, Gherkin, Gleam, GLSL, Gnuplot, Go, Go HTML Template, Go Template, Go Text Template, GraphQL, Groff, Groovy +| G | GAS, GDScript, GDScript3, Gemtext, Genshi, Genshi HTML, Genshi Text, Gettext, Gherkin, Gleam, GLSL, Gnuplot, Go, Go HTML Template, Go Template, Go Text Template, GraphQL, Groff, Groovy | H | Handlebars, Hare, Haskell, Haxe, HCL, Hexdump, HLB, HLSL, HolyC, HTML, HTTP, Hy | I | Idris, Igor, INI, Io, ISCdhcpd | J | J, Janet, Java, JavaScript, JSON, JSONata, Jsonnet, Julia, Jungle | K | Kakoune, Kotlin -| L | Lean4, Lighttpd configuration file, LLVM, lox, Lua +| L | Lean4, Lighttpd configuration file, LLVM, lox, Lua, Luau | M | Makefile, Mako, markdown, Markless, Mason, Materialize SQL dialect, Mathematica, Matlab, MCFunction, Meson, Metal, MiniZinc, MLIR, Modelica, Modula-2, Mojo, MonkeyC, MoonScript, MorrowindScript, Myghty, MySQL | N | NASM, Natural, NDISASM, Newspeak, Nginx configuration file, Nim, Nix, NSIS, Nu | O | Objective-C, ObjectPascal, OCaml, Octave, Odin, OnesEnterprise, OpenEdge ABL, OpenSCAD, Org Mode | P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Plutus Core, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerQuery, PowerShell, Prolog, Promela, PromQL, properties, Protocol Buffer, Protocol Buffer Text Format, PRQL, PSL, Puppet, Python, Python 2 | Q | QBasic, QML | R | R, Racket, Ragel, Raku, react, ReasonML, reg, Rego, reStructuredText, Rexx, RGBDS Assembly, Ring, RPGLE, RPMSpec, Ruby, Rust -| S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Sieve, Smali, Smalltalk, Smarty, SNBT, Snobol, Solidity, SourcePawn, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog +| S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Sed, Sieve, Smali, Smalltalk, Smarty, SNBT, Snobol, Solidity, SourcePawn, Spade, SPARQL, SQL, SquidConf, Standard ML, stas, Stylus, Svelte, Swift, SYSTEMD, systemverilog | T | TableGen, Tal, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, Typst | U | ucode | V | V, V shell, Vala, VB.net, verilog, VHDL, VHS, VimL, vue @@ -226,11 +226,11 @@ formatter outputs raw tokens. The latter is useful for debugging lexers. ### Styles Chroma styles are defined in XML. The style entries use the -[same syntax](http://pygments.org/docs/styles/) as Pygments. - -All Pygments styles have been converted to Chroma using the `_tools/style.py` +[same syntax](http://pygments.org/docs/styles/) as Pygments. All Pygments styles have been converted to Chroma using the `_tools/style.py` script. +Style names are case-insensitive. For example, `monokai` and `Monokai` are treated as the same style. + When you work with one of [Chroma's styles](https://github.com/alecthomas/chroma/tree/master/styles), know that the `Background` token type provides the default style for tokens. It does so by defining a foreground color and background color. diff --git a/vendor/github.com/alecthomas/chroma/v2/formatters/svg/font_liberation_mono.go b/vendor/github.com/alecthomas/chroma/v2/formatters/svg/font_liberation_mono.go index 70d692e..416208a 100644 --- a/vendor/github.com/alecthomas/chroma/v2/formatters/svg/font_liberation_mono.go +++ b/vendor/github.com/alecthomas/chroma/v2/formatters/svg/font_liberation_mono.go @@ -4,7 +4,7 @@ // with Reserved Font Name Liberation. // // This Font Software is licensed under the SIL Open Font License, Version 1.1. -// This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL +// This license is copied below, and is also available with a FAQ at: https://openfontlicense.org // // ----------------------------------------------------------- // SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ampl.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ampl.xml new file mode 100644 index 0000000..8c2479e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/ampl.xml @@ -0,0 +1,98 @@ + + + AMPL + ampl + *.mod + *.run + text/x-ampl + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/erb.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/erb.xml new file mode 100644 index 0000000..e597cd8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/erb.xml @@ -0,0 +1,37 @@ + + + ERB + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml index 7557bce..399cdd0 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gas.xml @@ -56,7 +56,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -139,7 +139,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gettext.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gettext.xml new file mode 100644 index 0000000..38c0c21 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/gettext.xml @@ -0,0 +1,24 @@ + + + + Gettext + pot + po + *.pot + *.po + application/x-gettext + text/x-gettext + text/gettext + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/graphql.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/graphql.xml index b062273..b40422f 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/graphql.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/graphql.xml @@ -76,6 +76,10 @@ + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/javascript.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/javascript.xml index efe80ed..0e475c5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/javascript.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/javascript.xml @@ -133,7 +133,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/json.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/json.xml index a34abfa..0057aa1 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/json.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/json.xml @@ -4,7 +4,9 @@ json *.json *.jsonc + *.json5 *.avsc + .luaurc application/json true true diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lateralus.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lateralus.xml new file mode 100644 index 0000000..cea10eb --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lateralus.xml @@ -0,0 +1,184 @@ + + + Lateralus + lateralus + ltl + *.ltl + text/x-lateralus + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lua.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lua.xml index e3d778f..903d458 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lua.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/lua.xml @@ -2,10 +2,8 @@ Lua lua - luau *.lua *.wlua - *.luau text/x-lua application/x-lua diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/luau.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/luau.xml new file mode 100644 index 0000000..79a6094 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/luau.xml @@ -0,0 +1,173 @@ + + + Luau + luau + *.luau + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/materialize_sql_dialect.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/materialize_sql_dialect.xml index 7094ddc..616d7ae 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/materialize_sql_dialect.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/materialize_sql_dialect.xml @@ -45,7 +45,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/meson.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/meson.xml index 130047d..fcfbda1 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/meson.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/meson.xml @@ -4,6 +4,7 @@ meson meson.build meson.build + meson.options meson_options.txt text/x-meson diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mysql.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mysql.xml index b6c2046..0517ec8 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mysql.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mysql.xml @@ -38,7 +38,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/php.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/php.xml index c9e22ea..774bb79 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/php.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/php.xml @@ -54,7 +54,7 @@ - + @@ -82,12 +82,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -101,6 +135,10 @@ + + + + @@ -116,7 +154,7 @@ - + @@ -132,6 +170,13 @@ + + + + + + + @@ -161,7 +206,7 @@ - + @@ -170,8 +215,9 @@ - + + @@ -185,7 +231,7 @@ - + @@ -194,7 +240,7 @@ - + diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/scdoc.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/scdoc.xml new file mode 100644 index 0000000..1b3a876 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/scdoc.xml @@ -0,0 +1,115 @@ + + + scdoc + scdoc + *.scd + *.scdoc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/spade.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/spade.xml new file mode 100644 index 0000000..4dfe329 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/spade.xml @@ -0,0 +1,292 @@ + + + Spade + spade + *.spade + text/spade + text/x-spade + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typescript.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typescript.xml index a3e3be2..b39c964 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typescript.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/typescript.xml @@ -226,7 +226,7 @@ diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/xml.xml b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/xml.xml index 2c6a4d9..99d5d53 100644 --- a/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/xml.xml +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/xml.xml @@ -10,6 +10,7 @@ *.wsdl *.wsf *.svg + *.qrc *.csproj *.vcxproj *.fsproj diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/erb.go b/vendor/github.com/alecthomas/chroma/v2/lexers/erb.go new file mode 100644 index 0000000..2d141ed --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/erb.go @@ -0,0 +1,29 @@ +package lexers + +import ( + "strings" + + . "github.com/alecthomas/chroma/v2" // nolint +) + +// ERB lexer is Ruby embedded in HTML. +var ERB = Register(DelegatingLexer(HTML, MustNewXMLLexer( + embedded, + "embedded/erb.xml", +).SetConfig( + &Config{ + Name: "ERB", + Aliases: []string{"erb", "html+erb", "html+ruby", "rhtml"}, + Filenames: []string{"*.erb", "*.html.erb", "*.xml.erb", "*.rhtml"}, + MimeTypes: []string{"application/x-ruby-templating"}, + DotAll: true, + }, +).SetAnalyser(func(text string) float32 { + if strings.Contains(text, "<%=") && strings.Contains(text, "%>") { + return 0.4 + } + if strings.Contains(text, "<%") { + return 0.1 + } + return 0.0 +}))) diff --git a/vendor/github.com/alecthomas/chroma/v2/regexp.go b/vendor/github.com/alecthomas/chroma/v2/regexp.go index c0e5e10..d183fa5 100644 --- a/vendor/github.com/alecthomas/chroma/v2/regexp.go +++ b/vendor/github.com/alecthomas/chroma/v2/regexp.go @@ -308,6 +308,7 @@ type RegexLexer struct { rules map[string][]*CompiledRule fetchRulesFunc func() (Rules, error) compileOnce sync.Once + compileError error } func (r *RegexLexer) String() string { @@ -446,8 +447,11 @@ func (r *RegexLexer) needRules() error { var err error if r.fetchRulesFunc != nil { r.compileOnce.Do(func() { - err = r.fetchRules() + r.compileError = r.fetchRules() }) + if r.compileError != nil { + return r.compileError + } } if err := r.maybeCompile(); err != nil { return err diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/api.go b/vendor/github.com/alecthomas/chroma/v2/styles/api.go index e26d6f0..9e21c88 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/api.go +++ b/vendor/github.com/alecthomas/chroma/v2/styles/api.go @@ -4,6 +4,7 @@ import ( "embed" "io/fs" "sort" + "strings" "github.com/alecthomas/chroma/v2" ) @@ -31,7 +32,7 @@ var Registry = func() map[string]*chroma.Style { if err != nil { panic(err) } - registry[style.Name] = style + registry[strings.ToLower(style.Name)] = style _ = r.Close() } return registry @@ -42,7 +43,7 @@ var Fallback = Registry["swapoff"] // Register a chroma.Style. func Register(style *chroma.Style) *chroma.Style { - Registry[style.Name] = style + Registry[strings.ToLower(style.Name)] = style return style } @@ -58,7 +59,7 @@ func Names() []string { // Get named style, or Fallback. func Get(name string) *chroma.Style { - if style, ok := Registry[name]; ok { + if style, ok := Registry[strings.ToLower(name)]; ok { return style } return Fallback diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/compat.go b/vendor/github.com/alecthomas/chroma/v2/styles/compat.go index 4a6aaa6..0309853 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/compat.go +++ b/vendor/github.com/alecthomas/chroma/v2/styles/compat.go @@ -31,6 +31,9 @@ var ( HrDark = Registry["hrdark"] HrHighContrast = Registry["hr_high_contrast"] Igor = Registry["igor"] + KanagawaDragon = Registry["kanagawa-dragon"] + KanagawaLotus = Registry["kanagawa-lotus"] + KanagawaWave = Registry["kanagawa-wave"] Lovelace = Registry["lovelace"] Manni = Registry["manni"] ModusOperandi = Registry["modus-operandi"] diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/darcula.xml b/vendor/github.com/alecthomas/chroma/v2/styles/darcula.xml new file mode 100644 index 0000000..4c35506 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/darcula.xml @@ -0,0 +1,83 @@ + \ No newline at end of file diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml b/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml index 711aeaf..c5b0dbb 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/github-dark.xml @@ -15,6 +15,7 @@ + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-dragon.xml b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-dragon.xml new file mode 100644 index 0000000..114d165 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-dragon.xml @@ -0,0 +1,83 @@ + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-lotus.xml b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-lotus.xml new file mode 100644 index 0000000..dde3bc8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-lotus.xml @@ -0,0 +1,83 @@ + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-wave.xml b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-wave.xml new file mode 100644 index 0000000..cebcda1 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/styles/kanagawa-wave.xml @@ -0,0 +1,83 @@ + diff --git a/vendor/github.com/alecthomas/chroma/v2/styles/solarized-light.xml b/vendor/github.com/alecthomas/chroma/v2/styles/solarized-light.xml index 4fbc1d4..8839e76 100644 --- a/vendor/github.com/alecthomas/chroma/v2/styles/solarized-light.xml +++ b/vendor/github.com/alecthomas/chroma/v2/styles/solarized-light.xml @@ -1,5 +1,5 @@