Solved: Garbage unicode characters between shortcodes and partials

My html output is including a lot of these unicode characters:  These characters appear between partials and shortcodes.

I’ve only noticed this happen when nesting partials in shortcodes or partials in partials.

--more above-- {{ range where .Site.Pages "Section" "chapter" }} {{ partial "Tooltip.html" . }} {{ end }} --more below--


{{ .Title }}

A screenshot of the output in dev tools:

This amounts to whitespace and that’s normally not an issue. But it’s causing a real headache when using flexbox. Flexbox counts those characters as flex items and there are unwanted gaps between the real items.

I just realized some of my files were saved with BOM due to some previous experimenting. That was the problem.

1 Like