Skip to content

Commit

Permalink
Documentation: rename gitlink macro to linkgit
Browse files Browse the repository at this point in the history
Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
Asciidoc configuration:

@@ -149,7 +153,10 @@
 # Inline macros.
 # Backslash prefix required for escape processing.
 # (?s) re flag for line spanning.
-(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
+# Explicit so they can be nested.
+(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
+
 # Anchor: [[[id]]]. Bibliographic anchor.
 (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
 # Anchor: [[id,xreflabel]]

This default regex now matches explicit values, and unfortunately in this
case gitlink was being matched by just 'link', causing the wrong inline
macro template to be applied. By renaming the macro, we can avoid being
matched by the wrong regex.

Signed-off-by: Dan McGee <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
toofishes authored and gitster committed Jan 7, 2008
1 parent 5f8bee5 commit 5162e69
Show file tree
Hide file tree
Showing 149 changed files with 603 additions and 603 deletions.
8 changes: 4 additions & 4 deletions Documentation/asciidoc.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## gitlink: macro
## linkgit: macro
#
# Usage: gitlink:command[manpage-section]
# Usage: linkgit:command[manpage-section]
#
# Note, {0} is the manpage section, while {target} is the command.
#
Expand All @@ -15,7 +15,7 @@ endsb=&#93;
tilde=&#126;

ifdef::backend-docbook[]
[gitlink-inlinemacro]
[linkgit-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
Expand Down Expand Up @@ -61,6 +61,6 @@ endif::backend-docbook[]
endif::doctype-manpage[]

ifdef::backend-xhtml11[]
[gitlink-inlinemacro]
[linkgit-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
2 changes: 1 addition & 1 deletion Documentation/blame-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ of lines before or after the line given by <start>.
Show raw timestamp (Default: off).

-S <revs-file>::
Use revs from revs-file instead of calling gitlink:git-rev-list[1].
Use revs from revs-file instead of calling linkgit:git-rev-list[1].

-p, --porcelain::
Show in a format designed for machine consumption.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/cmd-list.perl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sub format_one {
die "No description found in $name.txt";
}
if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) {
print $out "gitlink:$name\[1\]::\n\t";
print $out "linkgit:$name\[1\]::\n\t";
if ($attr =~ / deprecated /) {
print $out "(deprecated) ";
}
Expand Down
Loading

0 comments on commit 5162e69

Please sign in to comment.