Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ <h2 id="_refspec">The Refspec</h2>
</div>
</div>
<div class="paragraph">
<p>The format of the refspec is, first, an optional <code>`, followed by `&lt;src&gt;:&lt;dst&gt;`, where `&lt;src&gt;` is the pattern for references on the remote side and `&lt;dst&gt;` 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>&lt;src&gt;:&lt;dst&gt;</code>, where <code>&lt;src&gt;</code> is the pattern for references on the remote side and <code>&lt;dst&gt;</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>
Comment on lines -41 to +42
Copy link
Member

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
, please do not edit this file directly.

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.

Copy link
Member

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

</div>
<div class="paragraph">
<p>In the default case that is automatically written by a <code>git remote add origin</code> command, Git fetches all the references under <code>refs/heads/</code> on the server and writes them to <code>refs/remotes/origin/</code> locally.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="_refspec">Refspec</h2>
</div>
</div>
<div class="paragraph">
<p>Refspec 형식은 <code>` 와 `&lt;src&gt;:&lt;dest&gt;` 로 돼 있다. `</code> 는 생략 가능하고, <code>&lt;src&gt;</code> 는 리모트 저장소의 Refs 패턴이고 <code>&lt;dst&gt;</code> 는 매핑되는 로컬 저장소의 Refs 패턴이다.
<p>Refspec 형식은 <code>`</code><code>&lt;src&gt;:&lt;dest&gt;</code> 로 돼 있다. <code>`</code> 는 생략 가능하고, <code>&lt;src&gt;</code> 는 리모트 저장소의 Refs 패턴이고 <code>&lt;dst&gt;</code> 는 매핑되는 로컬 저장소의 Refs 패턴이다.
<code>+</code> 는 Fast-forward가 아닌 업데이트를 허용하는 것이다.</p>
</div>
<div class="paragraph">
Expand Down
Loading