The space before the period in the output is likely due to the way the HTML is being rendered by the browser. In the HTML snippet you provided, the text "Minimal theme" is wrapped in an <a> (anchor) tag, and the closing </a> tag is immediately followed by a period (.) without any space between them:
<a href="https://github.com/pages-themes/minimal" target="_blank" rel="noopener noreferrer">
Minimal theme
</a>.
However, when the browser renders this, it may add a space between the end of the link and the period due to:
-
Default CSS styling: Some browsers or CSS frameworks may apply default margins, padding, or whitespace handling to links or inline elements, which can introduce unexpected spacing.
-
Whitespace in HTML: If there is any whitespace (like a line break or indentation) between the </a> and the ., the browser may render it as a space. For example, if the HTML is formatted like this (with a line break before the period):
</a>
.
The browser may interpret the line break as a space.
How to Fix It:
To ensure no space appears before the period, you can:
-
Remove all whitespace between the </a> and the .:
<a href="https://github.com/pages-themes/minimal" target="_blank" rel="noopener noreferrer">Minimal theme</a>.
-
Use CSS to adjust spacing (e.g., margin-right or negative margin on the <a> tag):
a {
margin-right: -0.25em; /* Adjust as needed */
}
-
Use HTML comments to prevent whitespace rendering (less common):
<a href="...">Minimal theme</a><!--
-->.
The simplest solution is to write the closing </a> and the period directly next to each other without any line breaks or spaces in between.