Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to txt to not touch whitespace in pre-formatted strings #285

Open
jchavarri opened this issue May 27, 2021 · 1 comment
Open

Comments

@jchavarri
Copy link
Contributor

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.

@Khady
Copy link
Contributor

Khady commented May 27, 2021

Note that the moment the text content is modify is during printing, for example with Format.printf "%a" (Tyxml.Html.pp ~indent:true ()) html. If there is a long line of text, it will be wrapped by format to respect a column limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants