progit / progit2

Pro Git 2nd Edition
Other
5.71k stars 1.88k forks source link

Use unconstrained formatting pairs for possessive monospace #1772

Closed alexpovel closed 2 years ago

alexpovel commented 2 years ago

See also:

https://docs.asciidoctor.org/asciidoc/latest/text/troubleshoot-unconstrained-formatting/#unconstrained-edge-cases https://docs.asciidoctor.org/asciidoc/latest/text/quotation-marks-and-apostrophes/#possessive-monospace https://docs.asciidoctor.org/asciidoc/latest/text/#unconstrained

Fixes #1644

Changes

Uses different quoting style for formatting characters to allow correct escaping and printing. I found occurrences in two places (looking for `'s).

Before

export-subst-before my_backend_struct-before

After

export-subst-after my_backend_struct-after

These were generated using bundle exec rake book:build_pdf with Bundler version 2.3.17 and ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu].

However, note that the first case with the export-subst section is rendered incorrectly on the website as well, as expected:

export-subst-website

whereas the second one is actually currently rendered correctly on the website:

my_backend_struct-website

No idea why, I couldn't find an issue mentioning that. Perhaps the HTML output is different from the PDF one. I reckon this change doesn't regress that so it's fine.

Context

1644

ben commented 2 years ago

Much better. Thanks!