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

559 Commits

Author SHA1 Message Date
Alec Thomas
1da70b26df
Merge pull request #152 from pzl/monkeyc
Add MonkeyC & Jungle Lexers
2018-06-25 20:05:21 +10:00
Alec Thomas
e80511cc8c Document LineNumbersInTable(). 2018-06-25 20:04:04 +10:00
pzl
b18849cbf7
add jungle lexer 2018-06-23 08:53:43 -04:00
pzl
8387f77374
add monkeyc lexer 2018-06-23 08:53:29 -04:00
Alec Thomas
1e3d94a832
Merge pull request #151 from pzl/openscad
Add OpenSCAD Lexer
2018-06-23 14:46:21 +10:00
pzl
a2f2f3cf1c
add openscad lexer 2018-06-22 20:00:57 -04:00
Alec Thomas
d7b2ed20a4
Merge pull request #149 from kenshaw/fix-dollar-strings
Fix Dollar-Quoted Strings (postgres + cql)
2018-06-12 12:35:32 +10:00
Kenneth Shaw
95d0a9381b Fix Dollar-Quoted Strings (postgres + cql)
This commit refactors code from the markdown lexer into the chroma
package, and alters the PostgreSQL and CQL lexers to make use of it.

Additionally, an example markdown with the various sublexers is added.
2018-06-12 09:16:18 +07:00
Alec Thomas
307ceefd96
Merge pull request #148 from kenshaw/add-cql-lexer
Add Cassandra CQL lexer
2018-06-09 10:50:26 +10:00
Kenneth Shaw
2eb5cacd01 Add Cassandra CQL lexer
Adds a lexer (based off PostgreSQL) for Cassandra CQL support.
2018-06-09 07:42:49 +07:00
Jonathan Poelen
1b755a90bd c++: fix highlighting of the 'class' keyword
C++ highlighting ignores class keyword if it is not followed by a space

template<class T> struct X; // ok
template<class> struct X; // fails
template<class...> struct X; // fails
X<class::Y> x; // fails
2018-05-15 10:27:52 +10:00
Benjamin Congdon
7f4d42f585 Add EnsureNL to Rust lexer; Add test data for Rust lexer 2018-05-13 00:44:43 +10:00
Alec Thomas
222a1f0fc8 Don't require --html to write styles.
See #139.
2018-04-21 09:30:33 +10:00
German Lashevich
33cc533118 New styles from solarized styles family 2018-04-21 09:03:12 +10:00
Nathan Glenn
cd793681bc Create plaintext lexer (#138) 2018-04-19 07:47:59 +10:00
Alexander F Rødseth
17c7658a6a Add link to the Chroma Style Gallery 2018-04-09 20:15:14 +10:00
Peter Schultz
6b1131c006 Fix package name in README. 2018-04-04 23:22:54 +10:00
Weilin Shi
51d250fe8b Add testdata for dart 2018-04-02 18:39:22 +10:00
Weilin Shi
85c342e3e3 Add test data for gdscript 2018-03-26 17:30:55 +11:00
Alec Thomas
5640f893f2 Revert #78.
See #68.
2018-03-19 17:26:42 +11:00
Alec Thomas
5e8fe409a4 Update list of supported lexers. 2018-03-19 12:35:17 +11:00
Alec Thomas
6a5b719d5b Correct handling of whitespace in Go templates.
Fixes #127.
2018-03-19 12:07:09 +11:00
Alec Thomas
29681d89f2 Correctly handle := and $ 2018-03-19 11:00:56 +11:00
Alec Thomas
59f554950e Fix DelegatingLexer.
Fixes #126.
2018-03-19 10:54:09 +11:00
Alec Thomas
5ef2d37c8c Analysre for PHP. 2018-03-19 00:47:15 +11:00
Alec Thomas
b21a6da792 Human readable name for Go template lexers. 2018-03-19 00:44:09 +11:00
Alec Thomas
f315512f5c Add support for Go templates.
These are exposed as go-text-template and go-html-template.

Fixes #105.
2018-03-18 21:57:34 +11:00
Alec Thomas
db6920e68f Implemented delegating lexer.
This is a lexer that is useful for templating languages, where the
surrounding text may be of a different syntax. eg. PHP+HTML

The PHP lexer has been changed accordingly.

Fixes #80
2018-03-18 20:38:29 +11:00
Alec Thomas
15a009f0fc Add DelegatingLexer. 2018-03-17 13:44:03 +11:00
Alec Thomas
8f289191c9 Use alecthomas/assert. 2018-03-03 10:24:18 +11:00
Alec Thomas
3020e2ea8c Fix bug with nested newlines.
Fixes #124.

Also reinstitute lexer tests that disappeared during package split.
v0.4.0
2018-03-03 10:16:21 +11:00
John Millikin
aaa96c6984 Avoid adding an HTML prefix to empty class names.
This makes the raw markup a bit cleaner when there's lots of `Text`
tokens.
2018-02-25 19:46:48 +11:00
John Millikin
d7ee3c10b0 Add newlines in line number spans when wrapping in an HTML table.
Since these are wrapped in a `<pre>`, newlines hint the browser that the
line numbers should be on separate lines. This helps when rendering
content with broken CSS, or in a text-only browser.
2018-02-25 17:52:15 +11:00
Maximilian Hils
10c530a975 http: add CONNECT method 2018-02-25 08:12:11 +11:00
John Millikin
df4ec264da Render HTML class prefixes. 2018-02-18 14:58:46 +11:00
Alec Thomas
563aadc53c Moved lexers into alphabetical sub-packages.
This was done to speed up incremental compilation when working on
lexers. That is, modifying a single lexer will no longer require
recompiling all lexers.

This is a (slightly) backwards breaking change in that lexers are no
longer exported directly in the lexers package. The registry API is
"aliased" at the old location.
v0.3.0
2018-02-15 21:09:02 +11:00
Alec Thomas
50a6b50a3b Slightly smarter YAML.
See #118.
2018-02-15 12:45:07 +11:00
Alec Thomas
e4cd1649a3 Ensure that HTML code column expands to full width of container.
Fixes #114.
2018-02-11 21:14:56 +11:00
MunifTanjim
03fd03809c fix func compressStyle(s string) for CSS Shorthand properties 2018-02-11 19:10:59 +11:00
Sergey Yagodkin
33dd1722d5 fix PHP comment highlighting bug (#81) 2018-02-08 22:47:56 +11:00
Alec Thomas
205105fffc Fixed newlines at end of C++ files.
Fixes #104.
2018-02-08 12:26:28 +11:00
Sergey Yagodkin
a35b8fe9bd Fix incorrect javascript comment highlight (#104) 2018-02-08 10:22:37 +11:00
Alec Thomas
35126f9a94 Implement rudimentary JSX lexer based on https://github.com/fcurella/jsx-lexer/blob/master/jsx/lexer.py
Fixes #111.
2018-02-07 22:11:40 +11:00
Sergey Yagodkin
5964ce913c Add Solidity lexer 2018-02-07 11:16:00 +11:00
Alec Thomas
38cc9bdc19 Deduplicate some strings in the Kotlin lexer. 2018-01-04 13:53:33 +11:00
Victor Kropp
9653d70371 Kotlin lexer improvements
fixes #93
2018-01-03 18:52:55 +11:00
Alec Thomas
ce92184921 Deduplicate a bunch more text, in Python3 lexer this time. 2018-01-03 11:17:47 +11:00
Alec Thomas
4afa8aa3ed Deduplicate a bunch of text in Scala lexer.
This is part of an effort to speed up compilation of the lexers package.
2018-01-03 11:04:11 +11:00
Alec Thomas
71ddf5511a Fix README for test fixtures. 2018-01-02 20:59:02 +11:00
Alec Thomas
e0f32fbcb5 Make lexer fixture running cleaner. v0.2.1 2018-01-02 15:11:41 +11:00