1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-01-14 02:23:16 +02:00
Commit Graph

67 Commits

Author SHA1 Message Date
Alec Thomas
1724aab879 Implement compile-time lexer mutators.
This should fix #15.
2017-09-21 20:02:53 +10:00
Alec Thomas
60797cc03f Add tracing + better error recovery. 2017-09-21 17:52:28 +10:00
Alec Thomas
e5e7b57c46 Fix style tests. 2017-09-21 12:54:18 +10:00
Alec Thomas
551f7cee9a Return errors for invalid styles, rather than panicking. 2017-09-21 12:52:08 +10:00
Alec Thomas
e59d4639fc Add async/await to JS lexer. Fixes #12. 2017-09-21 12:36:22 +10:00
Alec Thomas
4c6dba0fc4 Add "monokailight" style. 2017-09-21 12:28:03 +10:00
Alec Thomas
fd4772d9fc Merge pull request #11 from azillion/patch-1
Add missing letter
2017-09-21 08:26:44 +10:00
alexander zillion
1b9f70d081 Add missing letter 2017-09-20 16:00:44 -05:00
Alec Thomas
e2d6abaa64 Document and add iterator panic recovery. 2017-09-20 23:06:23 +10:00
Alec Thomas
cc0e4a59ab Switch to an Iterator interface.
This is to solve an issue where writers returned by the Formatter
were often stateful, but this fact was not obvious to the API consumer,
and failed in interesting ways.
2017-09-20 22:19:36 +10:00
Alec Thomas
36ead7258a Use utf8.RuneCountInString() rather than len() :(
Fixes #10. Thanks @curio77.
2017-09-20 20:36:25 +10:00
Alec Thomas
3f941ddff4 Correctly add styles for line numbers and line highlights when inling.
Fixes #7. Fixes #9.
2017-09-20 20:32:15 +10:00
Alec Thomas
44b23f97b4 Split Regexp lexer into its own file. 2017-09-20 20:19:33 +10:00
Alec Thomas
a5637e60b2 Support for highlighting ranges of lines. 2017-09-20 14:24:49 +10:00
Alec Thomas
3f230ec717 Add support for line numbers. 2017-09-20 13:33:44 +10:00
Alec Thomas
feb78ed6f3 Combine HTML formatting functions. 2017-09-19 23:04:10 +10:00
Alec Thomas
b57f8a4b4b Update list. 2017-09-19 14:37:00 +10:00
Alec Thomas
2b1ffff691 Add missing Genshi variants. 2017-09-19 14:32:01 +10:00
Alec Thomas
a72960340e Add test to pre-compile all regexes. 2017-09-19 14:15:33 +10:00
Alec Thomas
87183b3633 Add HTML formatter option for setting the tab width. 2017-09-19 13:14:29 +10:00
Alec Thomas
631fc87d6e Fix lua lexer, and actually check error value from compiling regexes :( 2017-09-19 12:05:53 +10:00
Alec Thomas
00d5486e6b Add lexers.MatchMimeType(mimeType). 2017-09-19 11:52:23 +10:00
Alec Thomas
d80c30ae4e Sort formatters and styles Names(). 2017-09-19 11:31:51 +10:00
Alec Thomas
04782e0678 Add doc.go. 2017-09-19 11:20:43 +10:00
Alec Thomas
c259129e64 Rename "raw" to "tokens", as it makes more sense. 2017-09-19 11:12:07 +10:00
Alec Thomas
affaf50c63 Add lower-case '*.r' glob for R. 2017-09-19 11:03:25 +10:00
Alec Thomas
b24f9361ab Update list of languages in README. 2017-09-19 11:01:32 +10:00
Alec Thomas
3df4c80190 Rename S -> R + sort list of lexers. 2017-09-19 10:47:22 +10:00
Alec Thomas
fbc889aad6 Correct HTML output + add R/S.
Fixes #1, #2, #3.
2017-09-19 10:30:10 +10:00
Alec Thomas
d4a6811691 Merge pull request #2 from mattn/windows-color
support windows colors
2017-09-19 07:59:50 +10:00
Yasuhiro Matsumoto
686fad4ef4 support windows colors 2017-09-19 00:27:47 +09:00
Alec Thomas
2dc153de8a Add analyser for bash. 2017-09-18 20:30:19 +10:00
Alec Thomas
57c8e08560 Add CMake. 2017-09-18 19:29:14 +10:00
Alec Thomas
afc6c44415 Pure Go. 2017-09-18 15:05:57 +10:00
Alec Thomas
82f4e3cd79 Add list of supported languages. 2017-09-18 14:50:20 +10:00
Alec Thomas
c8636118d5 Remove unused dark/light style type. 2017-09-18 14:19:59 +10:00
Alec Thomas
19d5d708ad Gitter link. 2017-09-18 14:07:08 +10:00
Alec Thomas
d185b18f1e Add badges and Travis. 2017-09-18 14:04:02 +10:00
Alec Thomas
1374cf9ffb More README. 2017-09-18 13:59:11 +10:00
Alec Thomas
ca585f2681 Less-brief introduction. 2017-09-18 13:33:56 +10:00
Alec Thomas
431e913333 Update documentation. Include "quick" package. 2017-09-18 13:15:07 +10:00
Alec Thomas
adb07b9e0d Add Kotlin. 2017-09-18 11:49:16 +10:00
Alec Thomas
a10fd0a23d Switch to github.com/dlclark/regexp2.
This makes translating Pygments lexers much much simpler (and possible).
2017-09-18 11:16:44 +10:00
Alec Thomas
86bda70acd Switch to github.com/dlclark/regexp2 2017-09-15 22:18:20 +10:00
Alec Thomas
d12529ae61 HTML formatter + import all Pygments styles. 2017-07-20 00:01:29 -07:00
Alec Thomas
a3862242d5 Ensure ^C captures profile information. 2017-06-07 20:39:58 +10:00
Alec Thomas
a0db747409 Rename formatter "tokens" -> "raw". 2017-06-07 20:13:25 +10:00
Alec Thomas
7a7b85b4b3 Add protobuf and thrift. 2017-06-07 19:47:59 +10:00
Alec Thomas
7ae55eb265 Wire up content sniffing. 2017-06-07 19:47:59 +10:00
Alec Thomas
7b6a07b9bb Revert to using CIE76 for style colour matching.
Some testing showed RGB distance was *really* bad.
2017-06-07 19:47:59 +10:00