-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Single whitespace character after custom link template for Goldmark #6832
Comments
I have added another test for this, to be sure, and that passes (no whitespace added) -- so I'm pretty sure the problem must live in your template, which I don't see. |
I've created a sample repo that re-creates the problem, and here's the built and deployed site. After further investigation, it only seems to happen if the link is directly followed by something other than whitespace. If it's directly followed by whitespace, it doesn't add an additional character. |
What code editor are you using? I had the same issue — was positive I didn't put a newline at the end but VS Code was adding one automatically every time I saved. Easy fix was to remove the newline with something like |
I used VS Code for this. I suspect there is a setting somewhere "to add newline automatic". In many situations it makes sense, not this. |
Wait so how did you remove the trailing whitespace in that PR? I can't even tell it's there and am unable to get it removed in sublime, vim, or nano. You can't even see it in GitHub. Really strange--I've never had this issue before. Thanks so much for taking the time to look into this. |
I ... deleted it. None of my editors inserts auto-newlines into HTML files. As an added note, I use Bud Parr's Hugo extension in VS Code, but I don't think that has anything to do with this. |
Yeah, what's really strange is it was happening in other editors as well. Not just Sublime. But good to know the issue is on my end. I'll figure it out. Thanks for the help everyone. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hugo Static Site Generator v0.62.1/extended darwin/amd64 BuildDate: unknown
I needed a way to make markdown links open in a new tab with
target="_blank"
. Was able to do this in Blackfriday with thehrefTargetBlank
config option, but for Goldmark I followed the instructions exactly as outlined here. This works, but for some reason it produces a single space character directly after the link. I've ensuredrender-link.html
doesn't have any trailing spaces or lines.Let me know if this issue would be better filed under the Goldmark library.
Source:
Rendered:
Console:
The text was updated successfully, but these errors were encountered: