1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-15 13:33:12 +02:00

385 Commits

Author SHA1 Message Date
Joe Mooring
477ad4aefd Add await and async keywords to jsx and javascript
Closes #385
2020-07-28 22:57:04 +10:00
mrsdizzie
4da591c8f6 Use EnsureNL for go lexer
To allow proper detection of single line comments when there is no \n

Fixes #380
v0.8.0
2020-07-16 08:45:39 +10:00
Alec Thomas
e62d93f4aa Add a timeout to regexes.
This avoids pathologically bad match times. Fixes #378.
2020-07-08 20:23:13 +10:00
silverwind
5756434ec2 Add .editorconfig to ini lexer
`.editorconfig` files [are ini](https://editorconfig.org/#file-format-details). Also tested on the playground and looks well.
2020-07-03 08:17:32 +10:00
silverwind
391f301b71 Fix golangci-lint download
2b9ea60d89 updated the version but removed the `v` prefix which I think is what makes the download fail.
2020-07-03 08:15:46 +10:00
thargor
bac6996317 added curly braces to toml lexer 2020-06-30 21:01:17 +10:00
Alec Thomas
2b9ea60d89 Split PHP into two lexers - PHP and PHTML.
The former is pure PHP code while the latter is PHP code in <? ?> tags,
within HTML.

Fixes #210.
2020-06-30 21:00:09 +10:00
nprindle
11501493c9 Fix TypeScript keywords
strict mode keywords to highlight:

- yield
- package

contextual keywords to highlight:

- Keyword:
    - asserts
    - await
    - infer
    - is
    - keyof
    - of
- KeywordReserved:
    - async
    - get
    - namespace
    - readonly
    - require
    - set
    - type
    - from
    - global
- KeywordType:
    - any
    - never
    - object
    - symbol
    - unique
    - unknown
    - bigint

stop highlighting:

- AS
- char
- byte
- native
- short
- synchronized
- throws
- transient
- volatile
- sun
- netscape
- int
- float
- long
- double

Fix tsx test data for new 'from' highlighting
2020-06-24 10:36:27 +10:00
Thomas Tay
57c1bd941c
Added pony lexer (#372) 2020-06-12 14:05:39 +10:00
Francis Lavoie
500529fd43 Minor fix for name constants 2020-05-17 16:39:13 +10:00
Francis Lavoie
8785122ef8 Additional fixes for placeholders 2020-05-17 16:39:13 +10:00
Francis Lavoie
155bdea915 Update Caddyfile lexer to fix edgecases and improve colouring 2020-05-17 16:39:13 +10:00
Robin Thrift
bd463054be Add Zig lexer
Add a lexer for the Zig language (https://ziglang.org) based on the
pygments Zig lexer.
2020-05-16 21:36:07 +10:00
Francis Lavoie
68968043c3
Add Caddyfile lexer (#363) 2020-05-16 19:35:57 +10:00
Alec Thomas
ee4284bb40 Add a Rules.Merge() helper function.
Might be useful for #363.
2020-05-16 16:04:21 +10:00
Daniel G. Taylor
4065717136 feat: support HTTP/2 in HTTP lexer 2020-05-14 14:06:46 +10:00
thomas
2612dee604 add yaml test cases for more bool types and multi-line flow scalars. 2020-05-12 08:40:47 +10:00
thomas
2b9c82d89f yaml parse multiline block scalars as single StringDoc 2020-05-12 08:40:47 +10:00
thomas
16bde869ae yaml parse for all bool keyword constant variations 2020-05-12 08:40:47 +10:00
thomas
684c267d74 yaml parse plan scalar values as literals rather than text. 2020-05-12 08:40:47 +10:00
thomas
705c61c909 yaml parse --- and ... as NameNamespace 2020-05-12 08:40:47 +10:00
thomas
0d4fb389ce yaml parse keys as NameTag rather than Keyword 2020-05-12 08:40:47 +10:00
Cameron Little
ec5955f1a9 Make single # on a line recognized as CommentSingle
Fixes #318
2020-05-11 22:26:13 +10:00
Cameron Little
8c4fe7e59f Add failing test case for single # in bash 2020-05-11 22:26:13 +10:00
Cameron Little
809ff9ba45 Don't emit styles that are missing a class v0.7.3 2020-05-09 22:56:49 +10:00
Cameron Little
cc5e532d14 Add failing test for invalid css with allClasses
This was reported at https://github.com/gohugoio/hugo/issues/7207
2020-05-09 22:56:49 +10:00
Michael Kohl
6b8ef36ed9 Add ReasonML lexer 2020-05-04 08:51:58 +10:00
Michael Barz
82f38b96ec
add gherkin lexer (#354) 2020-05-02 08:59:58 +10:00
Igor Drozdov
80f48538c4
Improve performance of lexers.Get function (#351)
* Benchmark test for lexers.Get function

* Improve performance of lexers.Get function

Look for a lexer by file extension only when it failed to find a
lexer by name
2020-04-26 07:55:10 +10:00
Tristan Menzel
0da4bd1471 Adds support for jsx blocks in typescript lexer
Adds support for jsx tags with a period in their name
Adds support for jsx fragments (<></>)
2020-04-20 12:39:21 +10:00
GRIBOK
28041a86ba
Add YANG lexer (#348)
* add yang lexer. See alecthomas/chroma#347

* Alphabetise all keywords in yang lexer
2020-04-14 18:36:08 +10:00
toshimaru
737b3a043f Update go modules 2020-04-14 15:52:56 +10:00
Alec Thomas
cc53faa932 Add option to preserve all HTML classes.
Fixes #346.
v0.7.2
2020-04-13 07:36:37 +10:00
Alec Thomas
937aba1514 Fixes #344. 2020-03-15 17:06:21 +11:00
Alec Thomas
4f3623dce6 Fallback to HTML lexer for Markdown text.
Fixes #321.
2020-03-05 15:06:04 +11:00
satotake
34d9c7143b
Add new TokeniseOption EnsureLF (#336)
* Add new TokeniseOption EnsureLF

ref #329

* Use efficient process suggested by @chmike
2020-03-04 18:56:47 +11:00
Edgar Lee
e5d9650a20
Add hlb lexer (#332) 2020-02-26 21:03:38 +11:00
Adrian Gao
866d0c8fb5
Add lexer for SAS language (#337) 2020-02-26 20:57:32 +11:00
Orhan Hirsch
e54a758d06 Add testdata for terraform 2020-02-22 09:47:32 +11:00
Orhan Hirsch
c83e581f07 Updated terraform rules for Terraform 0.12+. Based on terraform
documentation (https://www.terraform.io/docs/configuration/index.html).
Added all builtin functions and updated syntax rules.
2020-02-22 09:47:32 +11:00
Anthony Fok
330c3bd39c Remove reference to now unneeded go.rice fork from go.mod
Closes #328
2020-02-18 20:17:20 +11:00
gardar
498eaa690f Fix deprecated methods in goreleaser.yml
See: https://github.com/goreleaser/goreleaser/pull/787  
and  
https://github.com/goreleaser/goreleaser/pull/1282
2020-01-30 07:22:26 +11:00
Amos Wenger
0f6a31d4cd rust: support raw identifiers
See https://doc.rust-lang.org/edition-guide/rust-2018/module-system/raw-identifiers.html
2020-01-10 10:04:37 +11:00
Pablo Santiago Blum de Aguiar
9e22bd6e2f Consider baseLineNumber when calculating the column width 2020-01-10 08:23:54 +11:00
Alec Thomas
bac74c1016 Fix Makefile. v0.7.1 2020-01-02 21:50:01 +11:00
Alexandru Băluț
19d5ee688c Highlight the line number targeted by the URL anchor
This currently works only when `html.WithClasses(true)` is used.
The same colors as for the pre-highlighted lines are used.
Only the line number is highlighted, so difficult to notice, but
better than nothing.
2019-12-31 11:10:38 +11:00
Jacques Pienaar
110f671e7c Update languages supported 2019-12-28 16:25:08 +11:00
Alexandru Băluț
a41c89767d Add the option of making the line numbers linkable 2019-12-12 17:31:43 -08:00
Alec Thomas
2d9ac06785 Fix PowerShell error on drive letters.
Fixes #312.
2019-12-07 19:00:42 -08:00
κeen
67fb64311a add SML lexer (#310) 2019-12-01 23:17:22 -08:00