I’m running this blog with Hugo. I love it because it’s super fast and functional, but I had a problem.
This is [test](https://example.com), just a [sample](https://sample.test)
This would output…
like this. It rendered unnecessary space before comma or period.
It was because
layouts/_default/_markup/render-link.html ended with a newline.
It is used with Render Hooks, which overrides default HTML rendering.
For example, we can add
target="_blank" to external links by using
However, goldmark adds whitespace if the template ends with a newline.
render-link.html of Fuji, the theme I’m using as a base of this blog, ends with no newlines.
However, I added a newline to the template by myself when I customize it.
Some editor adds a newline of the end automatically, so please be careful…