jpanther / congo

A powerful, lightweight theme for Hugo built with Tailwind CSS.
https://jpanther.github.io/congo/
MIT License
1.23k stars 328 forks source link

Encased links will be rendered with a blank character as prefix #800

Closed josephbadow closed 7 months ago

josephbadow commented 9 months ago

Issue description

Links that are encased by other characters will be rendered with a blank space at the beginning. screenshot

It looks like the HTML for the link will always create a new line. That is no problem, as long as the link stands alone. If it is encased with brackets or quotes -- meaning there is no blank character in markdown before the link -- it will be rendered with a space before the link.

Markdown for the above post:

I follow [eay.cc](https://eay.cc)'s blog and found this great idea of "[app defaults](https://eay.cc/2023/my-app-defaults/)". The idea is to list your main tools for several categories like Cloud storage, Mail client, Podcatcher etc. It's apparently based on the podcast [Hemispheric Views 097 - Duel of the Defaults!](https://listen.hemisphericviews.com/097). 

HTML for the above post:

<p>I follow 
<a href="[https://eay.cc](view-source:https://eay.cc/)" target="_blank" rel="noreferrer">eay.cc</a>’s blog and found this great idea of “
<a href="[https://eay.cc/2023/my-app-defaults/](view-source:https://eay.cc/2023/my-app-defaults/)" target="_blank" rel="noreferrer">app defaults</a>”. The idea is to list your main tools for several categories like Cloud storage, Mail client, Podcatcher etc. It’s apparently based on the podcast 
<a href="[https://listen.hemisphericviews.com/097](view-source:https://listen.hemisphericviews.com/097)" target="_blank" rel="noreferrer">Hemispheric Views 097 - Duel of the Defaults!</a>.</p>
More examples: Markdown Rendering Notes
Link to [Google.com](https://google.com) Link to Google.com This is ok
([Google.com](https://google.com)) ( Google.com) Blank between the ( and G
G[oogle.com](https://google.com) G oogle.com Blank between G and o

I didn't find any other mention of this problem. #679 seemed similar but I don't understand enough about this theme or hugos rendering to be sure of it.

Theme version

2.8.0

Hugo version

hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended windows/amd64

Which browser rendering engines are you seeing the problem on?

Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.), Firefox (Mozilla Firefox)

URL to sample repository or website

No response

Hugo output or build error messages

No response

josephbadow commented 9 months ago

Somehow I overlooked #695 which seemed to have the exact same issue and was fixed in the past.

jpanther commented 7 months ago

This has been fixed in #813