-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add html code tags for ko&en #1879
Conversation
<p>The format of the refspec is, first, an optional <code>`, 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 `</code> tells Git to update the reference even if it isn’t a fast-forward.</p> | ||
<p>The format of the refspec is, first, an optional <code>`</code>, followed by <code><src>:<dst></code>, where <code><src></code> is the pattern for references on the remote side and <code><dst></code> is where those references will be tracked locally. | ||
The <code>`</code> tells Git to update the reference even if it isn’t a fast-forward.</p> |
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.
As per
### DO NOT EDIT! Generated by script/update-book2.rb |
Seeing that the source is correct, we need to figure out why it is not rendered correctly instead.
The script that does the rendering code is located here: https://github.com/git/git-scm.com/blob/HEAD/script/update-book2.rb. I'll have a go at figuring out what is going on here, and circle back.
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.
@hanu9257 I figured it out: It is a regression in AsciiDoctor (I've reported it here). Previously, the ProGit book was rendered using AsciiDoctor v2.0.16, now it uses v2.0.23 (the latter having that bug).
How about resolving it like this?
diff --git a/script/update-book2.rb b/script/update-book2.rb
index 36baea4b5..a25aca5f1 100644
--- a/script/update-book2.rb
+++ b/script/update-book2.rb
@@ -74,6 +74,9 @@ def genbook(language_code, &get_content)
content = expand(initial_content, "progit.asc") { |filename| get_content.call(filename) }
# revert internal links decorations for ebooks
content.gsub!(/<<.*?\#(.*?)>>/, "<<\\1>>")
+ # work around AsciiDoctor v2.0.19 and later mis-interpreting multiple `+` as
+ # indicating the start or the end of literal monospace.
+ content.gsub!(/`\+`/, "`{plus}`")
asciidoc = Asciidoctor::Document.new(content, attributes: { "lang" => language_code })
html = asciidoc.render
In git#1879 a regression was reported in the way the explanation of the refspec format is rendered; It is now broken. The reason is a regression in AsciiDoctor (reported at asciidoctor/asciidoctor#4624). As a work-around, replace the `+` instances (which are mis-interpreted if more than one exists in the same line) by `{plus}` (which AsciiDoctor renders exactly like AsciiDoc would). Signed-off-by: Johannes Schindelin <[email protected]>
In git#1879 it was reported that at least the English and Korean version of chapter 10 section 5 displayed a regression where the explanation of the refspec format was formatted incorrectly. Turns out that this is a regression in AsciiDoctor v2.0.19. We just adjusted the `update-book2.rb` script to work around this issue, and now it is time to commit the result of re-running that script for all variants of the ProGit book. This commit is best viewed with `--word-diff`. Signed-off-by: Johannes Schindelin <[email protected]>
In git#1879 a regression was reported in the way the explanation of the refspec format is rendered; It is now broken. The reason is a regression in AsciiDoctor (reported at asciidoctor/asciidoctor#4624). As a work-around, replace the `+` instances (which are mis-interpreted if more than one exists in the same line) by `{plus}` (which AsciiDoctor renders exactly like AsciiDoc would). Signed-off-by: Johannes Schindelin <[email protected]>
In git#1879 it was reported that at least the English and Korean version of chapter 10 section 5 displayed a regression where the explanation of the refspec format was formatted incorrectly. Turns out that this is a regression in AsciiDoctor v2.0.19. We just adjusted the `update-book2.rb` script to work around this issue, and now it is time to commit the result of re-running that script for all variants of the ProGit book. This commit is best viewed with `--word-diff`. Signed-off-by: Johannes Schindelin <[email protected]>
Superseded by #1880. |
@hanu9257 thank you for contributing this change! Even though this PR did not get merged, it provided valuable and complete information that helped fix this regression swiftly. ❤️ |
Thanks about your comments that helped me learn about this repo more! Maybe next time I could make more valuable PR! Appreciate your work! 😉 |
Changes
Fix the broken html code tags for Korean and English in book about refspec.
Context
I was reading the section about refspec and realize that it's
<code></code>
tag was little bit broken in Englishand also found the same issue in Korean books. I think it will be more comfortable to read after the changes in both languages. 😄