1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-01-26 03:20:10 +02:00

853 Commits

Author SHA1 Message Date
Pi-Cla
9347b550ab
Add Gleam syntax highlighting (#959)
Resolves #958
2024-04-12 15:54:38 +10:00
cloudbridgeuy
6b7ffe10ff
chore(styles): add tokyonight inspired styles (#957)
Add [`tokyonight`](https://github.com/folke/tokyonight.nvim) based
styles.

`tokyonight-storm`

![image](https://github.com/alecthomas/chroma/assets/127410436/0a051a42-2131-4dd1-8927-35630da0529b)
`tokyonight-day`

![image](https://github.com/alecthomas/chroma/assets/127410436/bd6fcfe8-f0c0-4e0d-a53b-29fdc887712b)
`tokyonight-moon`

![image](https://github.com/alecthomas/chroma/assets/127410436/8aca5af6-86c9-4d8e-badd-539aa5399fba)
`tokyonight-night`

![image](https://github.com/alecthomas/chroma/assets/127410436/7b61d34a-e469-4f63-a7cc-fa385c1f6943)

Co-authored-by: Guzmán Monné <guzmonne@hotmail.com>
2024-04-11 10:16:00 +10:00
Gusted
736c0ea4cd
Typescript: Several fixes (#952) 2024-04-03 10:57:12 +11:00
Gusted
e5c25d045e
Org: Keep all newlines (#951)
- Move the `*` operator to inside the capturing group so all characters
that match `\s` is preserved and not just the first character.
- Add tests.
- Resolves https://github.com/alecthomas/chroma/issues/845

<details><summary>Input</summary>

```orgmode
Generic text.

/Italicized/

*strong*

=Heading=

~Codeblock~

+StrikeTrough+

_Underlined_
```

</details>

## Before
![Screen Shot 2024-04-01 at 23 26
15](https://github.com/alecthomas/chroma/assets/25481501/0ddc4b34-c434-4798-9b2a-0773b2be4f05)

## After
![Screen Shot 2024-04-01 at 23 25
52](https://github.com/alecthomas/chroma/assets/25481501/ad46591d-8d3c-421e-8564-d3d36abe6fa1)
2024-04-02 08:40:43 +11:00
renovate[bot]
d07caa43c1
chore(deps): update module github.com/alecthomas/assert/v2 to v2.7.0 (#949)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/alecthomas/assert/v2](https://togithub.com/alecthomas/assert)
| `v2.6.0` -> `v2.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2falecthomas%2fassert%2fv2/v2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2falecthomas%2fassert%2fv2/v2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2falecthomas%2fassert%2fv2/v2.6.0/v2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2falecthomas%2fassert%2fv2/v2.6.0/v2.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>alecthomas/assert (github.com/alecthomas/assert/v2)</summary>

###
[`v2.7.0`](https://togithub.com/alecthomas/assert/compare/v2.6.0...v2.7.0)

[Compare
Source](https://togithub.com/alecthomas/assert/compare/v2.6.0...v2.7.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/alecthomas/chroma).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 08:05:40 +11:00
Gusted
5f83664c2a
Vue: Handle more edge cases (#950)
- The parsing of `v-` directives expected that this always ended in
`">`, however it is possible that there are other attributes after an
`v-` directive also it made the assumption that there couldn't be any
spaces in the value of the directive. Therefore it could result in
incorrect lexing where almost the whole file could be marked as an
LiteralString.
- Handle `-` in HTML element names.
- Explicitly mark `=` as an operator token.
- Tests added.
- Ref: https://codeberg.org/forgejo/forgejo/issues/2945

## Before
![Screen Shot 2024-04-01 at 13 58
18](https://github.com/alecthomas/chroma/assets/25481501/e33d87fe-7788-40ca-a3c5-bbd964b91cb5)

## After
![Screen Shot 2024-04-01 at 23 01
17](https://github.com/alecthomas/chroma/assets/25481501/b6b0fec0-6dfc-4dfe-93cd-8a7c42a05ef7)
2024-04-02 08:02:14 +11:00
renovate[bot]
32c053f501
chore(deps): update all non-major dependencies (#948)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change | Age | Adoption | Passing |
Confidence |
|---|---|---|---|---|---|---|---|
| [esbuild](https://togithub.com/evanw/esbuild) | | patch | `0.20.1` ->
`0.20.2` |
[![age](https://developer.mend.io/api/mc/badges/age/hermit/esbuild/0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/hermit/esbuild/0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/hermit/esbuild/0.20.1/0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/hermit/esbuild/0.20.1/0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[github.com/alecthomas/chroma/v2](https://togithub.com/alecthomas/chroma)
| require | minor | `v2.12.0` -> `v2.13.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2falecthomas%2fchroma%2fv2/v2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2falecthomas%2fchroma%2fv2/v2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2falecthomas%2fchroma%2fv2/v2.12.0/v2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2falecthomas%2fchroma%2fv2/v2.12.0/v2.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>evanw/esbuild (esbuild)</summary>

###
[`v0.20.2`](https://togithub.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#0202)

[Compare
Source](https://togithub.com/evanw/esbuild/compare/v0.20.1...v0.20.2)

- Support TypeScript experimental decorators on `abstract` class fields
([#&#8203;3684](https://togithub.com/evanw/esbuild/issues/3684))

With this release, you can now use TypeScript experimental decorators on
`abstract` class fields. This was silently compiled incorrectly in
esbuild 0.19.7 and below, and was an error from esbuild 0.19.8 to
esbuild 0.20.1. Code such as the following should now work correctly:

    ```ts
    // Original code
    const log = (x: any, y: string) => console.log(y)
    abstract class Foo { @&#8203;log abstract foo: string }
    new class extends Foo { foo = '' }

// Old output (with --loader=ts
--tsconfig-raw={\"compilerOptions\":{\"experimentalDecorators\":true}})
    const log = (x, y) => console.log(y);
    class Foo {
    }
    new class extends Foo {
      foo = "";
    }();

// New output (with --loader=ts
--tsconfig-raw={\"compilerOptions\":{\"experimentalDecorators\":true}})
    const log = (x, y) => console.log(y);
    class Foo {
    }
    __decorateClass([
      log
    ], Foo.prototype, "foo", 2);
    new class extends Foo {
      foo = "";
    }();
    ```

- JSON loader now preserves `__proto__` properties
([#&#8203;3700](https://togithub.com/evanw/esbuild/issues/3700))

Copying JSON source code into a JavaScript file will change its meaning
if a JSON object contains the `__proto__` key. A literal `__proto__`
property in a JavaScript object literal sets the prototype of the object
instead of adding a property named `__proto__`, while a literal
`__proto__` property in a JSON object literal just adds a property named
`__proto__`. With this release, esbuild will now work around this
problem by converting JSON to JavaScript with a computed property key in
this case:

    ```js
    // Original code
    import data from 'data:application/json,{"__proto__":{"fail":true}}'
    if (Object.getPrototypeOf(data)?.fail) throw 'fail'

    // Old output (with --bundle)
    (() => {
      // <data:application/json,{"__proto__":{"fail":true}}>
      var json_proto_fail_true_default = { __proto__: { fail: true } };

      // entry.js
      if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail)
        throw "fail";
    })();

    // New output (with --bundle)
    (() => {
      // <data:application/json,{"__proto__":{"fail":true}}>
var json_proto_fail_true_default = { ["__proto__"]: { fail: true } };

      // example.mjs
      if (Object.getPrototypeOf(json_proto_fail_true_default)?.fail)
        throw "fail";
    })();
    ```

- Improve dead code removal of `switch` statements
([#&#8203;3659](https://togithub.com/evanw/esbuild/issues/3659))

With this release, esbuild will now remove `switch` statements in
branches when minifying if they are known to never be evaluated:

    ```js
    // Original code
    if (true) foo(); else switch (bar) { case 1: baz(); break }

    // Old output (with --minify)
    if(1)foo();else switch(bar){case 1:}

    // New output (with --minify)
    foo();
    ```

- Empty enums should behave like an object literal
([#&#8203;3657](https://togithub.com/evanw/esbuild/issues/3657))

TypeScript allows you to create an empty enum and add properties to it
at run time. While people usually use an empty object literal for this
instead of a TypeScript enum, esbuild's enum transform didn't anticipate
this use case and generated `undefined` instead of `{}` for an empty
enum. With this release, you can now use an empty enum to generate an
empty object literal.

    ```ts
    // Original code
    enum Foo {}

    // Old output (with --loader=ts)
    var Foo = /* @&#8203;__PURE__ */ ((Foo2) => {
    })(Foo || {});

    // New output (with --loader=ts)
    var Foo = /* @&#8203;__PURE__ */ ((Foo2) => {
      return Foo2;
    })(Foo || {});
    ```

- Handle Yarn Plug'n'Play edge case with `tsconfig.json`
([#&#8203;3698](https://togithub.com/evanw/esbuild/issues/3698))

Previously a `tsconfig.json` file that `extends` another file in a
package with an `exports` map failed to work when Yarn's Plug'n'Play
resolution was active. This edge case should work now starting with this
release.

- Work around issues with Deno 1.31+
([#&#8203;3682](https://togithub.com/evanw/esbuild/issues/3682))

Version 0.20.0 of esbuild changed how the esbuild child process is run
in esbuild's API for Deno. Previously it used `Deno.run` but that API is
being removed in favor of `Deno.Command`. As part of this change,
esbuild is now calling the new `unref` function on esbuild's long-lived
child process, which is supposed to allow Deno to exit when your code
has finished running even though the child process is still around
(previously you had to explicitly call esbuild's `stop()` function to
terminate the child process for Deno to be able to exit).

However, this introduced a problem for Deno's testing API which now
fails some tests that use esbuild with `error: Promise resolution is
still pending but the event loop has already resolved`. It's unclear to
me why this is happening. The call to `unref` was recommended by someone
on the Deno core team, and calling Node's equivalent `unref` API has
been working fine for esbuild in Node for a long time. It could be that
I'm using it incorrectly, or that there's some reference counting and/or
garbage collection bug in Deno's internals, or that Deno's `unref` just
works differently than Node's `unref`. In any case, it's not good for
Deno tests that use esbuild to be failing.

In this release, I am removing the call to `unref` to fix this issue.
This means that you will now have to call esbuild's `stop()` function to
allow Deno to exit, just like you did before esbuild version 0.20.0 when
this regression was introduced.

Note: This regression wasn't caught earlier because Deno doesn't seem to
fail tests that have outstanding `setTimeout` calls, which esbuild's
test harness was using to enforce a maximum test runtime. Adding a
`setTimeout` was allowing esbuild's Deno tests to succeed. So this
regression doesn't necessarily apply to all people using tests in Deno.

</details>

<details>
<summary>alecthomas/chroma (github.com/alecthomas/chroma/v2)</summary>

###
[`v2.13.0`](https://togithub.com/alecthomas/chroma/releases/tag/v2.13.0)

[Compare
Source](https://togithub.com/alecthomas/chroma/compare/v2.12.0...v2.13.0)

##### Changelog

- [`bd47355`](https://togithub.com/alecthomas/chroma/commit/bd47355)
fix: include compress state in style cache key
- [`1235bbf`](https://togithub.com/alecthomas/chroma/commit/1235bbf)
chore(deps): update all non-major dependencies
([#&#8203;944](https://togithub.com/alecthomas/chroma/issues/944))
- [`4e60c81`](https://togithub.com/alecthomas/chroma/commit/4e60c81) C#:
Allow for empty comments
([#&#8203;943](https://togithub.com/alecthomas/chroma/issues/943))
- [`fe5dde8`](https://togithub.com/alecthomas/chroma/commit/fe5dde8) Add
Lexer for NDISASM
([#&#8203;933](https://togithub.com/alecthomas/chroma/issues/933))
- [`6dd9f26`](https://togithub.com/alecthomas/chroma/commit/6dd9f26)
feat: introduce a LRU compiled style cache for the HTML formatter
([#&#8203;938](https://togithub.com/alecthomas/chroma/issues/938))
- [`898d467`](https://togithub.com/alecthomas/chroma/commit/898d467)
lexers/cue: support definitions and dollars in field names
([#&#8203;935](https://togithub.com/alecthomas/chroma/issues/935))
- [`0f92de4`](https://togithub.com/alecthomas/chroma/commit/0f92de4)
chore(deps): update all non-major dependencies
([#&#8203;934](https://togithub.com/alecthomas/chroma/issues/934))
- [`381050b`](https://togithub.com/alecthomas/chroma/commit/381050b)
Major updates to Caddyfile lexer
([#&#8203;932](https://togithub.com/alecthomas/chroma/issues/932))
- [`e9292e6`](https://togithub.com/alecthomas/chroma/commit/e9292e6)
chore(deps): update dependency goreleaser to v1.24.0
([#&#8203;925](https://togithub.com/alecthomas/chroma/issues/925))
- [`ddbae13`](https://togithub.com/alecthomas/chroma/commit/ddbae13)
chore: upgrade Go
- [`7ce2caf`](https://togithub.com/alecthomas/chroma/commit/7ce2caf) Fix
lexers check when built with newer Go
([#&#8203;928](https://togithub.com/alecthomas/chroma/issues/928))
- [`506e36f`](https://togithub.com/alecthomas/chroma/commit/506e36f)
fix(lexers/go): "~" is a valid token
([#&#8203;926](https://togithub.com/alecthomas/chroma/issues/926))
- [`f4788c0`](https://togithub.com/alecthomas/chroma/commit/f4788c0)
docs: add import to README
- [`39115eb`](https://togithub.com/alecthomas/chroma/commit/39115eb)
chore(deps): update dependency esbuild to v0.20.0
([#&#8203;921](https://togithub.com/alecthomas/chroma/issues/921))
- [`4c6fdb1`](https://togithub.com/alecthomas/chroma/commit/4c6fdb1) Add
.avsc to JSON lexer
([#&#8203;920](https://togithub.com/alecthomas/chroma/issues/920))
- [`ee60f7e`](https://togithub.com/alecthomas/chroma/commit/ee60f7e) Add
missing token types for Rego + add Rego to README
([#&#8203;919](https://togithub.com/alecthomas/chroma/issues/919))
- [`ae36e63`](https://togithub.com/alecthomas/chroma/commit/ae36e63) Add
support for Rego syntax
([#&#8203;918](https://togithub.com/alecthomas/chroma/issues/918))
- [`d7a7dd3`](https://togithub.com/alecthomas/chroma/commit/d7a7dd3)
chore(deps): update module github.com/alecthomas/assert/v2 to v2.5.0
([#&#8203;917](https://togithub.com/alecthomas/chroma/issues/917))
- [`c31293c`](https://togithub.com/alecthomas/chroma/commit/c31293c)
chore(deps): update dependency go to v1.21.6
([#&#8203;915](https://togithub.com/alecthomas/chroma/issues/915))
- [`ebc34cf`](https://togithub.com/alecthomas/chroma/commit/ebc34cf) fix
file extension typo, remove redundent parens
([#&#8203;914](https://togithub.com/alecthomas/chroma/issues/914))
- [`641b06f`](https://togithub.com/alecthomas/chroma/commit/641b06f) Fix
type operators not being recognised in Haskell
([#&#8203;913](https://togithub.com/alecthomas/chroma/issues/913))
- [`3ef9475`](https://togithub.com/alecthomas/chroma/commit/3ef9475)
chore(deps): update dependency watchexec to v1.25.1
([#&#8203;912](https://togithub.com/alecthomas/chroma/issues/912))
- [`23368be`](https://togithub.com/alecthomas/chroma/commit/23368be)
styles(catpuccin/gh-dark): LineHighlight grp
([#&#8203;911](https://togithub.com/alecthomas/chroma/issues/911))
- [`a8704a8`](https://togithub.com/alecthomas/chroma/commit/a8704a8) Add
lexer for RPMSpec
([#&#8203;907](https://togithub.com/alecthomas/chroma/issues/907))
- [`eb47752`](https://togithub.com/alecthomas/chroma/commit/eb47752) Add
lexer for Promela
([#&#8203;906](https://togithub.com/alecthomas/chroma/issues/906))
- [`3f395c9`](https://togithub.com/alecthomas/chroma/commit/3f395c9)
chore(deps): update all non-major dependencies
([#&#8203;905](https://togithub.com/alecthomas/chroma/issues/905))
- [`2018c2f`](https://togithub.com/alecthomas/chroma/commit/2018c2f)
chore(deps): update all non-major dependencies
([#&#8203;904](https://togithub.com/alecthomas/chroma/issues/904))
- [`016768b`](https://togithub.com/alecthomas/chroma/commit/016768b) Add
desktop entry lexer
([#&#8203;903](https://togithub.com/alecthomas/chroma/issues/903))
- [`f130045`](https://togithub.com/alecthomas/chroma/commit/f130045)
chore(deps): update dependency watchexec to v1.24.1
([#&#8203;901](https://togithub.com/alecthomas/chroma/issues/901))
- [`9670d34`](https://togithub.com/alecthomas/chroma/commit/9670d34)
chore(deps): update actions/checkout action to v4
([#&#8203;899](https://togithub.com/alecthomas/chroma/issues/899))
- [`ad03817`](https://togithub.com/alecthomas/chroma/commit/ad03817)
chore(deps): update all non-major dependencies
([#&#8203;898](https://togithub.com/alecthomas/chroma/issues/898))
- [`76039a5`](https://togithub.com/alecthomas/chroma/commit/76039a5)
chore(deps): update all non-major dependencies
([#&#8203;897](https://togithub.com/alecthomas/chroma/issues/897))
- [`678b799`](https://togithub.com/alecthomas/chroma/commit/678b799) Add
a lexer for the Materialize SQL dialect
([#&#8203;896](https://togithub.com/alecthomas/chroma/issues/896))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/alecthomas/chroma).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 15:10:31 +11:00
farcop
2580aaaa8e
Add Bazel bzlmod support into Python lexer (#947)
https://bazel.build/concepts/build-ref

"such a boundary marker file could be MODULE.bazel, REPO.bazel, or in
legacy contexts, WORKSPACE or WORKSPACE.bazel."
2024-03-14 07:33:16 +11:00
Alec Thomas
bd47355e46 fix: include compress state in style cache key
Fixes #945
v2.13.0
2024-03-12 17:08:58 +11:00
renovate[bot]
1235bbf2ce
chore(deps): update all non-major dependencies (#944) 2024-03-11 12:07:17 +11:00
Gusted
4e60c816eb
C#: Allow for empty comments (#943) 2024-03-04 11:01:17 +11:00
Andrzej Lichnerowicz
fe5dde8cf4
Add Lexer for NDISASM (#933)
The Netwide Disassembler outputs text that is assembly prefixed with
memory offsets and opcode bytes.
2024-02-28 00:17:29 +11:00
Alec Thomas
6dd9f269ef
feat: introduce a LRU compiled style cache for the HTML formatter (#938)
```
🐚 ~/dev/chroma $ benchcmp before.txt after.txt
benchmark                    old ns/op     new ns/op     delta
BenchmarkHTMLFormatter-8     160560        77797         -51.55%

benchmark                    old allocs     new allocs     delta
BenchmarkHTMLFormatter-8     1267           459            -63.77%

benchmark                    old bytes     new bytes     delta
BenchmarkHTMLFormatter-8     52568         25067         -52.32%
```
2024-02-27 17:05:08 +11:00
Paul Jolly
898d467079
lexers/cue: support definitions and dollars in field names (#935)
'$' is valid in a bare field name in CUE. It is not special. It happens
to be used by convention at the start of field names, but that is about
it.

Definitions start with '#'.

Add a "section" of tests that cover the various types of field. There
are no errors in new "tests", whereas before (i.e. without the change to
the CUE lexer) there would have been.
2024-02-27 07:45:59 +11:00
renovate[bot]
0f92de4f03
chore(deps): update all non-major dependencies (#934)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-26 11:36:44 +11:00
Francis Lavoie
381050ba00
Major updates to Caddyfile lexer (#932)
* Major updates to Caddyfile lexer

* yaml editorconfig

* nolint false positive
2024-02-20 20:08:27 +11:00
renovate[bot]
e9292e6994
chore(deps): update dependency goreleaser to v1.24.0 (#925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-15 11:10:40 +11:00
Alec Thomas
ddbae13883 chore: upgrade Go 2024-02-15 07:49:15 +11:00
W. Michael Petullo
7ce2caf57a
Fix lexers check when built with newer Go (#928)
Newer versions of Go emit '\f' rather than "\u000c" for formfeeds. This
patch adjusts the expected values for the lexers tests to match.

Fixes: https://github.com/alecthomas/chroma/issues/927

See also: https://github.com/golang/go/issues/64346 for the change to
Go.

Signed-off-by: W. Michael Petullo <mike@flyn.org>
2024-02-15 07:37:06 +11:00
Abhinav Gupta
506e36f9e0
fix(lexers/go): "~" is a valid token (#926)
With the introduction of generics,
tilde is a valid punctuation token in Go programs.
https://go.dev/ref/spec#Operators_and_punctuation

This updates the punctuation regex for the Go lexer,
and adds a test to ensure that it's treated as such.
2024-02-12 14:51:38 +11:00
Alec Thomas
f4788c0e9e docs: add import to README 2024-02-05 09:04:25 +11:00
renovate[bot]
39115ebe5c
chore(deps): update dependency esbuild to v0.20.0 (#921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-29 12:25:12 +11:00
silverwind
4c6fdb1d11
Add .avsc to JSON lexer (#920) 2024-01-26 07:20:16 +11:00
Jamie Tanna
ee60f7e738
Add missing token types for Rego + add Rego to README (#919) 2024-01-24 07:45:58 +11:00
Jamie Tanna
ae36e63369
Add support for Rego syntax (#918) 2024-01-23 08:01:11 +11:00
renovate[bot]
d7a7dd3331
chore(deps): update module github.com/alecthomas/assert/v2 to v2.5.0 (#917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 15:27:26 +11:00
renovate[bot]
c31293c797
chore(deps): update dependency go to v1.21.6 (#915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-15 14:47:28 +11:00
Luke Marzen
ebc34cf4aa
fix file extension typo, remove redundent parens (#914) 2024-01-15 11:26:41 +11:00
Philipp Hagenlocher
641b06ff8c
Fix type operators not being recognised in Haskell (#913) 2024-01-09 12:20:39 +11:00
renovate[bot]
3ef9475e0b
chore(deps): update dependency watchexec to v1.25.1 (#912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-08 12:15:10 +11:00
Aniket Teredesai
23368beae6
styles(catpuccin/gh-dark): LineHighlight grp (#911) 2024-01-07 09:23:23 +11:00
Silvan Calarco
a8704a8f0b
Add lexer for RPMSpec (#907) 2024-01-03 08:45:31 +11:00
Luke Marzen
eb47752470
Add lexer for Promela (#906) 2024-01-02 16:11:09 +11:00
renovate[bot]
3f395c95ef
chore(deps): update all non-major dependencies (#905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 15:08:31 +11:00
renovate[bot]
2018c2fa21
chore(deps): update all non-major dependencies (#904) 2023-12-25 13:32:55 +11:00
JakobDev
016768bc14
Add desktop entry lexer (#903) 2023-12-19 22:44:28 +11:00
renovate[bot]
f13004523b
chore(deps): update dependency watchexec to v1.24.1 (#901)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-18 12:43:06 +11:00
renovate[bot]
9670d341cc
chore(deps): update actions/checkout action to v4 (#899)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 14:39:33 +11:00
renovate[bot]
ad038174d4
chore(deps): update all non-major dependencies (#898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 14:38:07 +11:00
renovate[bot]
76039a532f
chore(deps): update all non-major dependencies (#897)
* chore(deps): update all non-major dependencies

* fix: fixes for test and lint

Test was slow because we were deep-comparing lexers. This is
unnecessary as we can just shallow compare.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alec Thomas <alec@swapoff.org>
2023-12-08 14:22:40 +11:00
Aru Sahni
678b799ad6
Add a lexer for the Materialize SQL dialect (#896) 2023-12-08 11:21:23 +11:00
Alec Thomas
c74f557ed2 Add renovate v2.12.0 2023-12-02 07:26:45 +11:00
Mohammed Anas
d77dc8ab51
Add Hare lexer (#882) 2023-11-29 10:00:30 +11:00
Daniel
234600703b
Add an Alloy lexer (#892) 2023-11-26 08:52:31 +11:00
Daniel
08be6f023f
Add an Agda lexer (#891) 2023-11-25 19:54:04 +11:00
codiacdev
d9f6ed634e
added: rule to objectpascal lexer (#888)
* added: another rule for objectpascal lexer

* updated: objectpascal lexer testdata

* fixed: processing of control (escape) characters

* updated: test data for objectpascal lexer
2023-11-24 06:53:33 +11:00
silverwind
c5948a61b1
Add Vagrantfile to Ruby lexer (#890) 2023-11-24 06:50:30 +11:00
Rik
7d4db86648
Add Microsoft Dax (#889) 2023-11-22 20:53:27 +11:00
codiacdev
1cda665d1b
fixed: number formats in objectpascal lexer (#887)
* fixed: number formats in objectpascal lexer

added: some missing types
added: special compiler directives

* updated: testdata for objectpascal lexer
2023-11-19 11:05:10 +11:00
tarneo
b5afdeeade
fix(dns): highlight domain names as NameClass (#886) 2023-11-18 21:58:01 +11:00