Character reference being detected in code block
backkem opened this issue · comments
I have a build failing on a file that didn't change:
- Last green build (Bikeshed 3.14.5)
- Failed build (Bikeshed 4.0.0)
It seems the piece of code &result
is being interpreted as a HTML Character reference. I wonder if this may be a regression or if I should somehow escape this character instead.
That error is correct - that's technically a parse error in HTML.
(Bikeshed is slightly more strict than HTML itself here; in HTML, if the &foo
isn't actually on the list of char ref names, it's technically valid in HTML. That's a really fragile sort of error, given the sheer size and unpredictability of that list, and the fact that prefixes count (like, ©right
is caught because "copy" is on the list, generating a parse error and the text "©right"). In your case, result
doesn't actually have a prefix on the list (closest is "Re"). So Bikeshed errs slightly stricter, but much more predictably, and flags anything which looks like a character reference.)
Yeah, you can either escape the ampersand (&
) or switch your pre
to xmp
(tho that won't work in your case, since you have markup there).