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

What is replacing soft line breaks with ensp? #15

Open
bwklein opened this issue Mar 30, 2024 · 0 comments
Open

What is replacing soft line breaks with ensp? #15

bwklein opened this issue Mar 30, 2024 · 0 comments
Assignees

Comments

@bwklein
Copy link
Contributor

bwklein commented Mar 30, 2024

In the tree output from the toHast function there is a string like

lineBreak\u000bThis line contains a shift-enter soft line-break here\u000bThis bit is after the line break.

This string contains the "U+000B Line Tabulation" control character.

This is replaced by   in the HTML code, after running it through the following code:

let html = unified()
  .use(rehypeStringify, { collapseEmptyAttributes: true })
  .stringify(tree);

Do you know how I can preserve this control character or replace it with the HTML hex reference ?

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