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

Remove forced whitespace after links #168

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

gprst
Copy link
Contributor

@gprst gprst commented Mar 26, 2021

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.

A whitespace was forced after ever link when the markdown was translated to HTML. For instance, something like this:
```md
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
Copy link
Owner

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
Copy link
Contributor Author

gprst commented Jun 17, 2021

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
Copy link
Contributor Author

gprst commented Jun 17, 2021

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
Copy link
Owner

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

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.

2 participants