From: Stuart Rackham <srackham@methods.co.nz>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: asciidoc 7--8 compatibility (was Re: pull-fetch-param.txt)
Date: Thu, 05 Oct 2006 10:06:53 +1300 [thread overview]
Message-ID: <4524226D.5000305@methods.co.nz> (raw)
In-Reply-To: <4523E401.5080709@s5r6.in-berlin.de>
[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]
Hi Stefan
Stefan Richter wrote:
> Stuart Rackham wrote:
>> From the AsciiDoc User Guide
>> (http://www.methods.co.nz/asciidoc/userguide.html#X53):
>>
>> If you want to disable unconstrained quotes, the new alternative
>> constrained quotes syntax and the new index entry syntax then you can
>> define the attribute asciidoc7compatible (for example by using the -a
>> asciidoc7compatible command-line option).
>
> Stuart,
>
> the actual issues were:
>
> 1.) Input which works with asciidoc 7 fails to build with asciidoc 8
> (after the intermediary XML step). This pair of tildes broke (but other
> occurences of tilde did not):
>
> | * A suffix '~<n>' to a revision parameter means the commit
> | object that is the <n>th generation grand-parent of the named
> | commit object, following only the first parent. I.e. rev~3 is
I've conditionally redefined subscript (tilde) and superscripting so
they use the old replacements mechanism when asciidoc7compatible is
defined rather than the asciidoc 8 default unconstrained quoting (patch
for affected files attached).
>
> 2.) Asciidoc 8 silently swallows characters from input which works with
> asciidoc 7. The two pluses in the following line vanished (but instances
> of single pluses per input line did not vanish):
>
> | `+?<src>:<dst>`; that is, an optional plus `+`, followed
Fixed by asciidoc7compatible.
>
> I wonder:
>
> - Are tilde and plus new special characters in asciidoc 8, or were they
> already special characters in asciidoc 7?
> [ A pair of single pluses encloses monospaced text in asciidoc 8.
> A pair of single tildes encloses subscripts. ]
>
> - If they were already special characters in asciidoc 7, what is the
> canonical way to escape them in asciidoc 7, 8, and hopefully 9?
> [ If they weren't special characters in asciidoc 7, then we need
> to use the asciidoc7compatible attribute. ]
>
> - Does asciidoc 7 accept the asciidoc7compatible attribute?
No.
>
> Thanks.
>
>
> PS:
>
> Junio, Stuart, here is another inconsistency between asciidoc 7 and 8.
> Please have a look at
> http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html .
> See the ASCII art above "SPECIFYING RANGES". The input
> \ | / \
> \ | / |
> produced
> \ | / \ | / |
> I.e. backslash-newline was interpreted by asciidoc 7 (or whatever you
> use to generate what is put online) as an escaped thus swallowed
> newline. But the output that I got here from asciidoc 8 (manpage as well
> as the html file) still has backslash and newline printed out.
Cheers, Stuart
[-- Attachment #2: asciidoc.patch --]
[-- Type: text/plain, Size: 1621 bytes --]
Index: asciidoc.conf
===================================================================
--- asciidoc.conf (revision 53)
+++ asciidoc.conf (working copy)
@@ -62,9 +62,9 @@
__=#emphasis
++=#monospaced
\##=#unquoted
-endif::asciidoc7compatible[]
^=#superscript
~=#subscript
+endif::asciidoc7compatible[]
[specialwords]
emphasizedwords=
Index: xhtml11.conf
===================================================================
--- xhtml11.conf (revision 53)
+++ xhtml11.conf (working copy)
@@ -22,6 +22,12 @@
\$=\$
`=\`
endif::asciimath[]
+ifdef::asciidoc7compatible[]
+# Superscripts.
+\^(.+?)\^=<sup>\1</sup>
+# Subscripts.
+~(.+?)~=<sub>\1</sub>
+endif::asciidoc7compatible[]
[ruler-blockmacro]
<hr />
Index: docbook.conf
===================================================================
--- docbook.conf (revision 53)
+++ docbook.conf (working copy)
@@ -18,6 +18,12 @@
[replacements]
# Line break markup is dropped (there is no DocBook line break tag).
(?m)^(.*)\s\+$=\1
+ifdef::asciidoc7compatible[]
+# Superscripts.
+\^(.+?)\^=<superscript>\1</superscript>
+# Subscripts.
+~(.+?)~=<subscript>\1</subscript>
+endif::asciidoc7compatible[]
[ruler-blockmacro]
# Only applies to HTML so don't output anything.
Index: html4.conf
===================================================================
--- html4.conf (revision 53)
+++ html4.conf (working copy)
@@ -18,6 +18,12 @@
[replacements]
# Line break.
(?m)^(.*)\s\+$=\1<br />
+ifdef::asciidoc7compatible[]
+# Superscripts.
+\^(.+?)\^=<sup>\1</sup>
+# Subscripts.
+~(.+?)~=<sub>\1</sub>
+endif::asciidoc7compatible[]
[ruler-blockmacro]
<hr />
next prev parent reply other threads:[~2006-10-04 21:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-02 18:55 [PATCH] escape tilde in Documentation/git-rev-parse.txt Stefan Richter
2006-10-03 5:52 ` Junio C Hamano
2006-10-03 7:31 ` Stefan Richter
2006-10-03 8:00 ` Junio C Hamano
2006-10-03 9:19 ` pull-fetch-param.txt (was Re: [PATCH] escape tilde in Documentation/git-rev-parse.txt) Stefan Richter
2006-10-03 20:01 ` pull-fetch-param.txt Junio C Hamano
2006-10-03 22:38 ` pull-fetch-param.txt Stuart Rackham
2006-10-04 2:03 ` pull-fetch-param.txt Junio C Hamano
2006-10-04 16:40 ` asciidoc 7--8 compatibility (was Re: pull-fetch-param.txt) Stefan Richter
2006-10-04 21:06 ` Stuart Rackham [this message]
2006-10-04 22:22 ` asciidoc 7--8 compatibility Stefan Richter
2006-10-04 23:40 ` Stuart Rackham
2006-10-04 16:28 ` pull-fetch-param.txt Stefan Richter
2006-10-04 17:15 ` pull-fetch-param.txt Stefan Richter
2007-07-12 13:06 ` pull-fetch-param.txt (was Re: [PATCH] escape tilde in Documentation/git-rev-parse.txt) Gerrit Pape
2007-07-12 21:58 ` pull-fetch-param.txt Junio C Hamano
2007-07-13 5:53 ` pull-fetch-param.txt Gerrit Pape
2007-07-13 7:17 ` pull-fetch-param.txt Junio C Hamano
2007-07-13 7:48 ` pull-fetch-param.txt Gerrit Pape
2007-07-20 14:32 ` pull-fetch-param.txt Gerrit Pape
2007-07-20 16:45 ` pull-fetch-param.txt Junio C Hamano
2007-07-20 17:09 ` pull-fetch-param.txt Julian Phillips
2007-07-20 18:01 ` pull-fetch-param.txt Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4524226D.5000305@methods.co.nz \
--to=srackham@methods.co.nz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=stefanr@s5r6.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).