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

Space inside of a tag being removed #4845

Closed
burgoyn1 opened this issue Aug 20, 2018 · 2 comments
Closed

Space inside of a tag being removed #4845

burgoyn1 opened this issue Aug 20, 2018 · 2 comments

Comments

@burgoyn1
Copy link

Have an interesting issue regarding spaces in links. When converting from HTML to doc. if you have a trailing space inside of the link, it strips it but does not add it outside of the link. For example:

This is a test sentence with a link <a href="https://www.google.ca">inside </a>of it
The sentence will convert to this: This is a test sentence with a link insideof it.
The sentence should be: This is a test sentence with a link inside of it.
Ran the standard pandoc config, pandoc -s input.html -o output.docx

This is happening on the latest version of Pandoc on Ubuntu 12.04

The document converts fine and works except for the above issue.

@jgm
Copy link
Owner

jgm commented Aug 20, 2018

% pandoc -f html -t native
x<a href="/foo"> leading trailing space </a>x
^D
[Plain [Str "x",Link ("",[],[]) [Str "leading",Space,Str "trailing",Space,Str "space"] ("/foo",""),Str "x"]]

We should handle this the same way we handle:

% pandoc -f html -t native
x<em> hi </em>x
^D
[Plain [Str "x",Space,Emph [Str "hi"],Space,Str "x"]]

@burgoyn1
Copy link
Author

Thanks for the quick fix, Looking forward for the next release.

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

No branches or pull requests

3 participants