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

5 Commits

Author SHA1 Message Date
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.
2019-10-24 17:03:35 +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
b44683eae8 Fix linter. 2019-10-06 20:14:05 +11: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