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

341 Commits

Author SHA1 Message Date
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
jpienaar
ec2ba48433 Add lexer for LLVM TableGen (#311) 2019-12-01 20:15:03 -08:00
jpienaar
352e19d7f2 Avoid empty matches in MLIR lexer
Ensure at least one character is matched else lexing ends up making no forward progress.
2019-12-01 10:42:06 -08:00
jpienaar
15c7468f37 Add simple MLIR lexer (#308)
* Add simple MLIR lexer

* Add simple MLIR lexer

Use sample.mlir from https://github.com/jpienaar/mlir-grammar
2019-11-30 14:29:49 -08:00
Alec Thomas
9fb54c5f75 Add separate go module for ./cmd/chromad.
Fixes #261.
2019-11-28 11:40:24 +11:00
Alec Thomas
2d34ebacdb Simplify configuration of HTML call. 2019-11-28 11:21:12 +11:00
Ghislain Bourgeois
3b4f493cc3 Add basic keyword highlighting for YAML 2019-11-28 10:31:21 +11:00
Alec Thomas
28dcb8565c Fixes #305. v0.7.0 2019-11-24 12:49:34 +11:00
exploide
cfc6117710 mysql: added keywords 'privileges', 'identified' and 'user' 2019-11-23 22:23:30 +11:00
Bjørn Erik Pedersen
5921c52787 Add bool argument to WithClasses, WithLineNumbers etc.
This allows the boolean options to be reconfigured, e.g:

```go
options := getOptions()
options = append(options, html.WithLineNumbers(true))
```

Fixes #301
2019-11-22 10:13:00 +11:00
Bjørn Erik Pedersen
d3926cc0e1 Add WithPreWrapper option 2019-11-20 20:09:17 +11:00
Alec Thomas
3aaf3e542f Fix Java lexer (synced with latest Pygments).
Fixes #297.
v0.6.9
2019-11-05 13:57:51 +11:00
Alec Thomas
bbc59ac372 Emit error tokens when there's a group mismatch.
Also don't panic/recover, as we no longer use panic to report "real"
errors.

Fixes #295.
v0.6.8
2019-10-24 17:03:35 +11:00
Sean McGivern
a1c4eaa235 Add J lexer
Generated with _tools/pygments2chroma.py.

Sample `toupper` verb from `stdlib.ijs`:
https://github.com/jsoftware/jsource/blob/j808-release/jlibrary/system/main/stdlib.ijs
2019-10-22 07:23:06 +11:00
rsteube
aaa94ce97c svg: fixed text background rectangles
- location and size looks fine now even when scaled and with larger files (used `em` for line height and `ch` for
width)
- svg width/height looks ok now, width has some problems on scaling (seems this needs to be a unit like `px` and cannot be `ch` so it's a rough estimate)
- updated liberation mono font to 2.00.5 since the current one had wrong width for the full block character (https://github.com/liberationfonts/liberation-fonts)
2019-10-16 21:09:59 +11:00
rsteube
611a24ccdd embedded font in svg (#292) 2019-10-15 23:38:42 +11:00
Alec Thomas
73d11b3c45 Clear background colour for TTY formatters. 2019-10-15 21:08:17 +11:00
Alec Thomas
b44683eae8 Fix linter. 2019-10-06 20:14:05 +11:00
Alec Thomas
b618823c9b Add bibtex support.
Fixes #271.
2019-10-06 18:10:54 +11:00
Alec Thomas
20b4f5f89b Revert float pattern for C++.
Fixes #290.
2019-10-05 22:53:51 +10:00
Jos512
6acfa13b55 Improve info on test regeneration (#287) 2019-10-04 08:57:10 +10:00
rsteube
22511fb8e4 added svg formatter
basic version without any options. colors and font-styles seem to be ok.
rough support for text background in styles like `murphy` using predrawn
rectangles (svg has no text background attribute).

things to improve:
- svg width attribute (`<svg width=""`)
- linenumbers
- highlighting
- embedded font
- tabwidth option
- margins?
- better position/width calculation (rectangles not correctly drawn on
resize)
2019-09-30 09:43:27 +10:00
Jos512
0ff62486a5 Add multi-line comments to Nim lexer (#285) 2019-09-30 09:40:34 +10:00
matthias
8eb6aa7fb6 Add Language Igor (#276)
* Add Language Igor

Igor is a scientific language developed by
[WaveMetrics](https://www.wavemetrics.com/).

This lexer was translated directly from the [pygments
lexer](http://pygments.org/docs/lexers/#lexers-for-igor-pro) without any
changes. The pygments lexer is very basic but working properly for most
of the cases.
v0.6.7
2019-09-23 09:35:48 +10:00
Jos512
d122d30d7b Add ABAP lexer 2019-09-20 07:52:50 +10:00
Jos512
b964bce980 Update TradingView lexer to v4 (#279) 2019-09-17 23:11:42 +10:00
Alec Thomas
5152194c71 Sync docker lexer to latest Pygments.
Fixes #265.
2019-09-11 12:35:02 +10:00
Ray Lee
2f5349aa18 Add italics support for indexed colour terminals 2019-09-02 08:12:43 +10:00
Ray Lee
f2e05136f7 Add italics support for truecolour terminals 2019-09-02 08:12:43 +10:00
Jonathan Poelen
6a3320f1b7 Fix several errors with c++
- add attribute ([[...]])
- add c++20 keywords
- add hexadecimal floatting point
- add digits separator
- fix unamed class/union/struct/enum (fix #272)
- fix function name detection
2019-09-01 13:11:26 +10:00
Alec Thomas
2b493e2556 Fix SCSS issue with comments.
Fixes #272
2019-08-29 10:01:55 +10:00
toshimaru
a5a6d529d0 Use chroma.StyleEntries instead of map 2019-08-15 13:07:48 +10:00
FujiHaruka
70b7419367 Add EnsureNL in TypeScript lexer config 2019-08-11 22:10:30 +10:00
Nathan Ringo
65b5eea9a2 Adds .fth extension for Forth. 2019-08-06 21:53:29 +10:00
Alec Thomas
f8432cf78f Update issue templates 2019-07-23 09:39:56 +10:00
Alec Thomas
b1f0162469 Update issue templates 2019-07-23 09:27:41 +10:00
Alec Thomas
e6a56651ad Add width:100% to content <td> when inlining styles.
Fixes #225.
2019-07-20 23:19:20 +10:00
Alec Thomas
be3313d5c7 Update to most recent version of go.rice fork. v0.6.6 2019-07-20 20:32:22 +10:00
Alec Thomas
bbbfbe4e7a Update to more recent golangci-lint. 2019-07-19 18:57:05 +10:00
Alec Thomas
2ec7e6c2d1 Use Kong enum for lexers, formatters and styles. 2019-07-19 16:29:13 +10:00
Alec Thomas
5b0cc9c6ee Use goreleaser release binary. v0.6.5 2019-07-19 11:04:16 +10:00
Alec Thomas
ebc5ee03ef Latest go.rice version. 2019-07-17 15:35:59 +10:00
Alec Thomas
3411213e25 Temporarily use go.rice fork with correct asset timestamping/versioning. 2019-07-17 11:24:40 +10:00
Alec Thomas
9fbb21283d Render full HTML. 2019-07-16 23:24:37 +10:00
Alec Thomas
89e7ddc5d9 Disable spellchecking/autocomplete. 2019-07-16 22:22:30 +10:00