Format highlighting as DocLayout Docs using ANSI styles
- Dominant language
- Haskell
- Stars
- 218
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
As observed in, https://github.com/jgm/pandoc/pull/9565#issuecomment-2016610872, skylighting-format-ansi as-is produces somewhat bad results when rendering with a background color different from the terminal default, which is quite visible in the context of the work-in-progress Pandoc ANSI writer. We could control the output a bit better in that context by adding a formatter that returns a doclayout `Doc`. The goal would be a `Doc` that when rendered with doclayout's `renderANSI` would have the style's background color limited to a rectangle bounding the code block.
High fidelity to highlight styles will require support in doclayout for indexed and 24 bit colors, https://github.com/jgm/doclayout/issues/32
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing skylighting-format-ansi and the Pandoc ANSI writer context described in the issue. Check doclayout's renderANSI and doclayout issue #32 for the indexed and 24-bit color limitations. Done means a formatter returns a doclayout Doc whose rendered ANSI background is bounded to the code block while preserving supported highlight styles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100