Page MenuHomeFreeBSD

website: fix WARN after hugo settings change
ClosedPublic

Authored by vladlen on Wed, Jul 1, 4:47 PM.
Tags
Referenced Files
Unknown Object (File)
Sat, Jul 4, 2:25 PM
Unknown Object (File)
Fri, Jul 3, 1:41 PM
Unknown Object (File)
Thu, Jul 2, 1:02 AM
Subscribers
None

Details

Summary

Fixes Hugo warning messages that indicated real problems
with missing lines due to misinterpretation of
square brackets placed on a single line (started and
finished with square brackets belonging to different
AsciiDoc constructs).

The AsciiDoctor parser interprets a line that starts with an opening square
bracket and ends with a closing square bracket as a block attribute
directive. In the release notes for 9.1-10.3R, some paragraphs follow this
pattern:

[amd64,i386] The drm2(4) Radeon GPU driver... http://...[(r254885)]

The first "[" and the last "]" in this line are matched by the parser,
which then discards the entire content of the block. The parser only
emits a warning when it cannot parse the content of the directive,
which is why only certain lines produce visible errors. Most of these
paragraphs were silently dropped from the rendered output.

*The fix is to break the line* so that the paragraph does not begin with
"[" and end with "]". Moving the URL to a new line resolves the issue:

[amd64,i386] The drm2(4) Radeon GPU driver... 
http://...[(r254885)]

This problem only appears in the 9.1R-10.3R release notes.
Previous releases had HTML format. Later releases
switched to a different format for commit references that does not use
trailing square brackets, so they are unaffected.
Because the parser discards the
affected content silently without a warning in most cases, the problem
can easily go unnoticed. This makes it particularly dangerous, as it
can remove large sections of text without any indication that something
went wrong. We should keep this in mind when writing or reviewing any
AsciiDoc content.

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vladlen created this revision.
vladlen retitled this revision from website: fix WARN after hugo setings change to website: fix WARN after hugo settings change.Wed, Jul 1, 4:51 PM
This revision is now accepted and ready to land.Wed, Jul 1, 4:57 PM
This revision was automatically updated to reflect the committed changes.

Thank you so much, I've tried various things and was unable to get to the bottom of this myself!

Thank you so much, I've tried various things and was unable to get to the bottom of this myself!

It took time to understand, that the real problem on the other side of the line, not in the [amd64] text,
and it is healed by the splitting of the line.

I did similar patch for documentation. EN and RU are fixed, but other languages need to be fixed during translation.
Hugo generates error, if at least one language has error in the same line (why I changed other language
with English version) - https://reviews.freebsd.org/D57999.