Dimitri Merejkowsky
c6b01cb2a6
Ensure newline in diff lexer
...
Fix #96
2017-12-03 18:14:52 -08:00
Marsel Arduanov
3289a10f11
improve http lexer
2017-11-24 13:46:27 +11:00
Marsel Arduanov
27b4ff36e0
add http lexer
2017-11-24 13:46:27 +11:00
Kenneth Shaw
9401ea963f
Expand single and double quote string lexing in mysql, sql, and transactsql lexers
...
This PR converts the simple string lexing in the mysql, sql, and
transactsql lexers to an expanded node, bringing their behavior inline
with the postgres lexer.
The rationale for this change is that currently, when using Chroma to
lex a partial SQL query with these three lexers (for example, while in
the middle of writing a database query), a string will not be matched by
the mysql, sql, and transactsql lexers until the closing single or
double-quote is encountered.
This behavior can be seen by running the following in a terminal:
$ echo "select 'aoeu 0x9" |chroma -l sql
$ echo "select 'aoeu 0x9'" |chroma -l sql
With the mysql, sql, and transactsql lexers, the above two lines will
have dramatically different output. Comparatively, if using the postgres
lexer instead of the sql lexer, the above will output both lines
identically (excluding the closing quote).
This change will make for a better and more consistent user experience
in any package using chroma to highlight partial, incomplete, or
incorrect SQL, and is arguably "more correct", as all SQL lexers will
now behave the same (at least with regards to single/double-quoted
strings or quoted identifiers).
2017-11-24 13:44:34 +11:00
Alec Thomas
d08da055be
Add TeX/LaTeX support.
...
Fixes #88 .
2017-11-24 13:36:50 +11:00
Alec Thomas
2e7e1e1580
Extend lexers.Get() to support filenames.
...
Fixes #94 .
2017-11-24 13:32:17 +11:00
Steeve Chailloux
9c81d25368
Add svg support
2017-11-16 12:14:47 +11:00
Alec Thomas
75ce88603c
Import SCSS lexer from Pygments. Fixes #82 .
2017-11-09 10:28:14 +11:00
Weilin Shi
20d03ba7a2
Catch some static class in csharp lexer ( #78 )
2017-10-30 09:23:12 +11:00
Alec Thomas
93868c5a99
Add Objective-C and support lexer priorities.
...
Fixes #66 .
2017-10-23 11:21:37 +11:00
Trevor Joynson
d6eb27d4b5
Allow .mkd and .markdown ( #73 )
...
Yeah I know, but they are out there ;)
2017-10-23 10:49:04 +11:00
Trevor Joynson
972d70075c
Allow for /usr/bin/env shebangs ( #71 )
2017-10-23 10:45:29 +11:00
Alec Thomas
92586fdff2
Switch shell #! to preproc.
2017-10-10 13:28:24 +11:00
Kaushal Modi
8f90f6d80a
Add newline at eof for (system)verilog lexers
...
Fixes https://github.com/alecthomas/chroma/issues/55
2017-10-09 11:11:35 -04:00
Alec Nunn
7b1e9f541f
Added basic Morrowind Scripting parsing
2017-10-07 20:13:00 -07:00
Orivej Desh
0d06c7041c
Add Nix lexer
2017-10-03 12:31:09 +00:00
Alec Thomas
6d281667bb
Merge pull request #49 from FooSoft/toml-lexer
...
Add lexer for TOML
2017-10-02 08:42:05 +11:00
Alex Yatskov
0f36e89eec
Add lexer for TOML
2017-10-01 11:52:09 -07:00
Jip J. Dekker
8f804c9a34
Add lexer for MiniZinc
2017-10-01 22:37:43 +11:00
Alec Thomas
ce3d6bf527
Invert default "ensure newline" behaviour so that it is opt-in.
...
See #47 .
2017-09-30 14:41:05 +10:00
Alec Thomas
573c1d157d
Ensure a newline exists at the end of files.
...
Fixes #42 .
2017-09-29 21:59:52 +10:00
Alec Thomas
528bed2b60
Fix some capitalisation.
2017-09-29 09:56:36 +10:00
Alec Thomas
a430eb8138
Merge pull request #46 from DeedleFake/master
...
Add WDTE
2017-09-29 00:12:53 +10:00
Alec Thomas
2ca426a8d1
Make TypeMappingLexer a bit less prone to error.
2017-09-27 21:52:25 +10:00
Alec Thomas
cbc3d5b9f0
Implement special name mappings for EmacsLisp.
...
Fixes #43 .
2017-09-27 21:32:45 +10:00
DeedleFake
d3a2d28ee2
Add WDTE.
2017-09-26 10:34:57 -04:00
griffin-stewie
caf2542b1b
fix HTML entity reference ' to ‘
2017-09-26 22:37:54 +09:00
Alec Thomas
fc9897da0d
Add SystemVerilog and hexdump.
...
Fixes #33 .
2017-09-26 22:13:55 +10:00
Alec Thomas
bc2d6680e4
Run gofmt -s over the codebase.
2017-09-26 22:05:55 +10:00
Weilin Shi
e6a24f7412
Add c# highlight fix #32
2017-09-26 12:15:59 +08:00
Hugo Locurcio
8604f257c9
Rename the Nimrod lexer to Nim
...
It has been the official name of the language for a while now.
2017-09-25 20:08:20 +02:00
Alec Thomas
022592be12
Correctly prioritise names over aliases.
2017-09-25 11:56:25 +10:00
Guillaume Laforge
cce6c8e193
Missing 'as' and 'in' keywords
2017-09-24 14:45:24 +02:00
Alec Thomas
b83a015e0b
More YAML tweaks.
2017-09-24 21:57:29 +10:00
Alec Thomas
b25b614cb6
Remove comment.
2017-09-24 21:47:46 +10:00
Alec Thomas
237eebbe1a
A naive YAML lexer.
...
Does not try to be smart in anyway. Instead, just highlights what it
can. Used this reference: https://learnxinyminutes.com/docs/yaml/
Fixes #13 .
2017-09-24 21:47:05 +10:00
Weilin Shi
cff81ff391
Add GDScript lexer
2017-09-24 12:58:23 +08:00
Alec Thomas
9d7539a4cd
Fix bug in Turtle lexer.
2017-09-22 23:27:40 +10:00
Alec Thomas
f8658edb57
Add Restructured Text lexer.
2017-09-22 22:29:17 +10:00
Weilin Shi
698bea1f19
Fix JavaScript keywords
2017-09-22 09:00:51 +08:00
Alec Thomas
60797cc03f
Add tracing + better error recovery.
2017-09-21 17:52:28 +10:00
Alec Thomas
e59d4639fc
Add async/await to JS lexer. Fixes #12 .
2017-09-21 12:36:22 +10: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
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