Code blocks should be rendered as <pre><code> instead of just <pre>
Open
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 384
- Forks
- 124
- Avg merge
- 22h 28m
- Merged PRs (30d)
- 10
Description
IIUC currently Block.toHtml renders .code blocks using only a <pre> container:
This breaks client-side highlighters like Highlight.js and some CSS themes which expect the standard structrue. I think it would be great to reuse some existing highlighters as a catch-all highlighting on the top of define_lexed_text defined languages.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/verso/Verso/Doc/Html.lean at Block.toHtml, then inspect define_lexed_text to understand how defined languages are rendered. The change is complete when code blocks produce standard
structure and the intended catch-all highlighting behavior is clearly addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100