-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix formatting #1318
base: main
Are you sure you want to change the base?
Fix formatting #1318
Conversation
@@ -104,7 +104,7 @@ $ for b in $(git for-each-ref --format='%(refname:short)' refs/remotes); do git | |||
---- | |||
|
|||
It may happen that you'll see some extra branches which are suffixed by `@xxx` (where xxx is a number), while in Subversion you only see one branch. | |||
This is actually a Subversion feature called ``peg-revisions'', which is something that Git simply has no syntactical counterpart for. | |||
This is actually a Subversion feature called `peg-revisions`, which is something that Git simply has no syntactical counterpart for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 We only set a name in monospace if it's a literal term used in a code editor or a terminal. I don't know SVN that well, but my google-fu doesn't turn up any use of a peg-revision
literal. If I'm right, we should change this to ``peg revisions''
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with the old revision was that all text starting with ``peg-revisions'' was displayed as an inline code-block because the code block marks were not ended properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may be true with the GitHub asciidoc renderer, but that's not our main front-end. The HTML version that renders on git-scm.com looks like this:
And the PDF version looks like this:
Both of which are exactly what we want.
I do wonder if the GitHub renderer would agree with the other outputs if we used the "`newer syntax`"
mentioned in the Asciidoctor documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already mentioned a similar issue in this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So which of the mentioned alternatives would you suggest, @max123kl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this depends on the editor and/or the operating system used.
For macOS and Windows you can use the following table.
The complete list can be found here (look for quotation and/or punctuation)
On Linux machines you can program a keyboard shortcut or copy+paste the Unicode special characters from a second file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Linux you can hold right Ctrl+right Shift+u and then type x201C
Its a bit painful but works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already mentioned a similar issue in this comment.
And in that thread I mentioned that I don't want to adopt "frozen" curly quotes in the source code for this book:
In the end, it's much easier for new contributors to type the standard ASCII characters, regardless of their keyboard layout, OS, or editor, so we should stick to either the old (
``quote''
) or new ("`quote`"
) Asciidoc notation.
To that end, please replace this change with ``peg revisions''
. That's consistent with our current style, and renders properly everywhere but on GitHub, which is not a recommended way to read the book.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do respect your decision in this repo.
But I don't think I understand what you mean by "frozen". Is anything be blocked or locked?
The key code I do propose in my last post will produce the typographically correct quotes, not the straight ones. That's what you want, isn't it?
Because the punctuation (quotation marks) in German, as well as in other foreign languages, is visually different from here, you have to find an alternative, working solution.
Fortunately, the UTF-8 code offers all required characters. So you can, without conversion via the text editor, get the desired characters by key code.
In the German Repo I implemented my suggestion and didn't detect any error in any of the important output formats. On the other hand, the GitHub renderer also displays the quotation marks correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I understand what you mean by "frozen".
I just mean that the "curliness" of the quotation mark is embedded in the choice of utf-8 character, where the "`
notation makes a source-code token that renders to a curly quote.
We did the opposite of what you're doing in your repo with en- and em-dashes a while back; the literal "–" character was un-rendered to --
in the source code so it would be easier to type, and harder to mistake for a hyphen.
I like having source code that can render to a configurable target character. If we decide to convert all dashes to hyphens in the future, we can do that in the renderer. If we decide we want all quotation marks to be straight, we can do that without having to sed
through the entire source code.
Oh, and as it turns out, the GitHub renderer handles the "`new style`"
notation properly.
That's not correct. The literal character you are showing is an en-dash, but if you enter
That's wonderful for English writing. This is one the main reasons why I prefer using the UTF-8 code, by keyboard shortcut, you call "frozen", as long as the files are used for printed texts. |
You can ping me if you have agreed on a solution ;) |
Just to chime in (a bit late), I'm working on making the book compilable with asciidoctor 2.0.10, so we have to switch to the new syntax, which basically makes me sed through the source code. So in the end, we are tied to possible evolutions of the renderer. I would tend to agree with @max123kl that we should use full unicode source, because that way, we rely only on the coding system, not on possibly evolving publishing tools. |
No description provided.