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

Make text replace newlines with spaces #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

buob
Copy link

@buob buob commented Oct 9, 2020

Full test case incoming, but this is to fix the situation that we were running into where if an anchor had a newline in it, it wouldn't convert the anchor. This just turns the newline into a whitespace if it shows up in a text node. It doesn't break all newlines, I'm assuming by this function call it's already converted the typical newlines into other node types, and this is only when the parser assumes it's text.

It might not be the best solution given the docs on common mark option lead me to believe that newlines in anchor text are actually valid... not sure if that means it renders them as a line break or just that they're valid.

@jsarafajr
Copy link
Owner

Hi @buob, could you elaborate on this one please? It seems like it's a breaking change.

Also, this case should probably be covered by a new test.

@buob
Copy link
Author

buob commented Oct 13, 2020

@jsarafajr Sorry about the lazy PR -- just updated the description, not sure if you have any thoughts on whether this is the best approach or not given the problem.

I'll definitely be submitting a proper test case soon.

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

Successfully merging this pull request may close these issues.

None yet

2 participants