Add an option to txt to not touch whitespace in pre-formatted strings
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 179
- Forks
- 63
- Avg merge
- 5h
- Merged PRs (30d)
- 22
Description
Sometimes in tyxml apps one receives a pre-formatted string that is rendered with white-space: pre;.
At the moment, the only way to handle this case is by disabling indentation for whole tree altogether. It'd be nice to add an option to txt to honour new lines and other whitespace specifically for a single text element.
Contributor guide
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
Start by locating the implementation of txt and the existing option that disables indentation for the whole tree. Add a per-text-element option that preserves newlines and other whitespace for pre-formatted strings while keeping current behavior by default; verify both modes with the relevant existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100