progit / progit2

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

Broken formatting due to interpreted monospaced text #1913

Open vadcx opened 7 months ago

vadcx commented 7 months ago

There's no existing/similar bug report.

This report is about a single actionable bug.

This report is about the ProGit book, version 2, English language.

Bug covers book website/pdf

Problem is present in the Pro Git book on the website?

Which version of the book is affected?

Source files

Describe the bug:

What was supposed to be monospaced inline code is interpreted by asciidoctor for formatting characters, breaking in a few places. This affects PDF, EPUB, but NOT the HTML/website. I didn't check MOBI.

The solution is to either escape the formatting charcaters manually with backslash \ or instead use the literal monospace syntax: `+inline here+`

I suppose it's easier to mass replace single backticks with the new literal monospace syntax instead of hunting down all occurrences one by one? Personally I don't know the syntax of asciidoctor enough to do the latter, but the replacement seems easy enough.

Steps to reproduce:

Git Internals -> The Refspec, page 432 in PDF. The plus sign is missing and the paragraph has broken code formatting

Expected behavior:

Correct formatting

Screenshots:

Website (correct): gitpro-plus-website

Epub (broken) gitpro-plus-epub

PDF (broken) gitpro-plus-pdf

Additional context:

A comment by jnavila implies its the new syntax that the book wasn't adapted for. One single occurrence of this type of error was fixed in PR: https://github.com/progit/progit2/pull/1300

refspec.asc:

The format of the refspec is, first, an optional `+`, followed by `<src>:<dst>`, where `<src>` is the pattern for references on the remote side and `<dst>` is where those references will be tracked locally.
The `+` tells Git to update the reference even if it isn't a fast-forward.

PS: Oh my such strict bug templates are a pain to adhere to, if you already typed it all out properly anyway...

Device

No response

Operating system

No response

Browser/application + version

No response