Commit Graph
19 Commits
Author SHA1 Message Date
Siavash Askari Nasr d18e8a46f2 Add InlineCode option for inline code blocks
- Add an `InlineCode` option for inline code blocks
- When `PreventSurroundingPre` option is enabled, do not wrap the code by `Line` and `CodeLine`
- Write and update related tests
2022-06-14 21:17:50 +10:00
Siavash Askari Nasr 806ca29650 Add V lexer (#640) 2022-06-04 06:00:44 -07:00
Siavash Askari Nasr dea6a13339 Add CSS style inheritance to WithCustomCSS option 2022-05-18 02:45:33 -07:00
Siavash Askari Nasr 7d779408db [html formatter] Add option to let users provide custom CSS styles
Example: WithCustomCSS(map[chroma.TokenType]string{chroma.Line: `display: inline;`})
2022-05-18 02:45:33 -07:00
Siavash Askari Nasr d6e61d3cbe Use span for .line, put code inside <code>
Apparently only "phrasing content" are permitted inside `pre` and
`code`, and `div` is not one of them, so replace it with `span`, `div`
wasn't necessary anyway.

Also it makes sense to put code inside `code` tag(except for line
numbers).

Removed `overflow:auto` and `width: auto` as they didn't seem to be
necessary and actually prevented horizontal scroll bar to appear when content
didn't fit in the viewport.
2021-11-10 19:52:49 +11:00
Siavash Askari Nasr 5ed5054d73 Put lines in a div & code lines in a span, Add WrapLongLines Option 2021-11-09 19:14:33 +11:00
Siavash Askari Nasr 4d7154e8c7 Raku: Fix unterminated heredoc fixes #547
- Fix heredoc
- Move testdata to raku directory
- Add testdata for unterminated heredoc
2021-09-19 08:41:00 +10:00
Siavash Askari Nasr 26f16a6f7c Raku: Improve nested regex and code, function designs
- Improve nested regex and code
- Improve function designs
- Add escape character support to single quotes and regex
- Fixes and cleanups
2021-08-29 07:10:23 +10:00
Siavash Askari Nasr 4f779665e9 Raku: Add more test data 2021-08-29 07:10:23 +10:00
Siavash Askari Nasr 22fac1fc0f Raku: Fix Match hash access, $<variable><key> 2021-08-29 07:10:23 +10:00
Siavash Askari Nasr 2535d1a99e Raku: Fix operators that come after < 2021-08-29 07:10:23 +10:00
Siavash Askari Nasr bb38ae204f Raku: Fix detecting adverbs, plus a little cleanup 2021-08-29 07:10:23 +10:00
Siavash Askari Nasr b71f4c6607 Raku: Fix incorrectly matching closing brackets as opening 2021-08-15 21:39:18 +10:00
Siavash Askari Nasr f4ffd6cea9 Fix Raku colon pair, function adverb and POD declaration 2021-08-01 21:48:42 +10:00
Siavash Askari Nasr 9df8bd4f92 fish: Fix incorrect tokenisation of command arguments containing dash
Command line arguments containing dash/hyphen were incorrectly
tokenised as command line options.
2021-06-17 18:13:46 +10:00
Siavash Askari Nasr 402a150d3e SCSS fixes and modifications, fixes #451 2021-06-09 21:44:22 +10:00
Siavash Askari Nasr 3ec045529f Some Raku modifications and making use of #519 and #518 2021-06-09 09:50:19 +10:00
Siavash Askari Nasr 10329f849e Add ByGroupNames function, same as ByGroups but use named groups (#519)
For named groups that are not given, an Error will be emitted anyway.

This also handles the case when an Emitter for group `0` is provided
or not. Since numbers can also be used for names.
But it might be over-doing, because why would anyone use ByGroupNames
if they wanted to assign a token to the whole match?!
2021-06-08 22:26:59 +10:00
Siavash Askari Nasr 22cbca546a Allow skipping group's emitter, via passing nil as emitter 2021-06-07 22:45:39 +10:00