jakewies / hugo-theme-codex

A minimal blog theme for Hugo 🍜
https://themes.gohugo.io/themes/hugo-theme-codex/
MIT License
334 stars 188 forks source link

Remove forced whitespace after links #168

Closed gprst closed 3 years ago

gprst commented 3 years ago

A whitespace was forced after every link when the markdown was translated to HTML. For instance, something like this:

This is [some link](https://github.com), with a comma right after.

would be rendered like this:

This is some link , with a comma right after.
jakewies commented 3 years ago

Hmm this is interesting. I wonder if anyone working on this file locally and having a formatter like prettier running on their files would run into this issue. What do you think @gprst ?

gprst commented 3 years ago

No solution occurs to me. This issue has been discussed multiple times (either on Hugo forum or on Hugo GitHub repo), and the answer of bep at the time was that you can use a linter in many situations, but should not in this one.

I imagine one can set up their linter to format files only on save. And since this file isn't supposed to change much (if at all), it should be fine and stay the same without any unwanted new line addition.

gprst commented 3 years ago

Also another workaround would be to configure the theme to use Blackfriday instead of Goldmark (the default) as a markdown formatter, but Blackfriday will eventually be deprecated, which is to keep in mind.

jakewies commented 3 years ago

Ok in that case I think this should be a default in the project. Thanks for the fix!