git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 3/3] asciidoctor-extensions: fix spurious space after linkgit

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Feb 27, 2019, 18:17 UTC
Message-ID
<e1021ad4a97a78e7428fcdfbf2af7196a0c8d340.1551290936.git.martin.agren@gmail.com>
In-Reply-To
<cover.1551290936.git.martin.agren@gmail.com>

When we render, e.g., "linkgit:gitglossary[7]." with Asciidoctor, we get "gitglossary(7) ." with a space between the linkgit macro expansion and the punctuation. We can fix this by dropping the trailing newline after we've turned `linkgit:foo[bar]` into `<citerefentry>..</citerefentry>`.

The diff produced by `USE_ASCIIDOCTOR=Yes ./doc-diff HEAD^ HEAD` is almost 6000 lines large and shows how this fixes "git-foo(x) ,", "(see git-bar(y) )" and so on. One might wonder whether this also turns, e.g., "see linkgit:foo[1] for more" into "see foo(1)for more", but no. We get "...</citerefentry> for more" in the XML, see, e.g., git-am.xml, so the space ends up in git-am.1 just fine.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/asciidoctor-extensions.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/asciidoctor-extensions.rb b/Documentation/asciidoctor-extensions.rb
index ec83b4959e..f7a5982f8b 100644
--- a/Documentation/asciidoctor-extensions.rb
+++ b/Documentation/asciidoctor-extensions.rb
@@ -16,7 +16,7 @@ module Git
           "<citerefentry>\n" \
             "<refentrytitle>#{target}</refentrytitle>" \
             "<manvolnum>#{attrs[1]}</manvolnum>\n" \
-          "</citerefentry>\n"
+          "</citerefentry>"
         end
       end
     end
-- 
2.21.0
Previous: Martin ÅgrenNext: brian m. carlson
Message 17 of 31 in “asciidoctor-extensions: fix spurious space after linkgit”
  1. 0/3 asciidoctor-extensions: fix spurious space after linkgitMartin Ågren, Feb 25, 2019
  2. 1/3 Documentation/Makefile: add missing xsl dependencies for manpagesMartin Ågren, Feb 25, 2019
  3. Eric SunshineFeb 25, 2019
  4. Martin ÅgrenFeb 25, 2019
  5. Eric SunshineFeb 25, 2019
  6. Martin ÅgrenFeb 26, 2019
  7. Eric SunshineFeb 26, 2019
  8. Martin ÅgrenFeb 27, 2019
  9. 2/3 Documentation/Makefile: add missing dependency on asciidoctor-extensionsMartin Ågren, Feb 25, 2019
  10. 3/3 asciidoctor-extensions: fix spurious space after linkgitMartin Ågren, Feb 25, 2019
  11. brian m. carlsonFeb 26, 2019
  12. brian m. carlsonFeb 26, 2019
  13. Martin ÅgrenFeb 26, 2019
  14. 0/3 asciidoctor-extensions: fix spurious space after linkgitMartin Ågren, Feb 27, 2019
  15. 1/3 Documentation/Makefile: add missing xsl dependencies for manpagesMartin Ågren, Feb 27, 2019
  16. 2/3 Documentation/Makefile: add missing dependency on asciidoctor-extensionsMartin Ågren, Feb 27, 2019
  17. 3/3 asciidoctor-extensions: fix spurious space after linkgitMartin Ågren, Feb 27, 2019
  18. brian m. carlsonFeb 28, 2019
  19. Junio C HamanoMar 3, 2019
  20. 0/2 fix spurious space after linkgit, now in *.htmlMartin Ågren, Mar 10, 2019
  21. 1/2 Documentation/Makefile: add missing dependencies on asciidoctor-extensionsMartin Ågren, Mar 10, 2019
  22. 2/2 asciidoctor-extensions: fix spurious space after linkgit in *.htmlMartin Ågren, Mar 10, 2019
  23. Jeff KingMar 11, 2019
  24. Martin ÅgrenMar 11, 2019
  25. Junio C HamanoMar 11, 2019
  26. Martin ÅgrenMar 11, 2019
  27. Junio C HamanoMar 11, 2019
  28. 1/3 Documentation/Makefile: add missing xsl dependencies for manpagesJunio C Hamano, Mar 11, 2019
  29. 2/3 Documentation/Makefile: add missing dependency on asciidoctor-extensionsJunio C Hamano, Mar 11, 2019
  30. 3/3 asciidoctor-extensions: fix spurious space after linkgitJunio C Hamano, Mar 11, 2019
  31. Martin ÅgrenMar 11, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.