On 01/06/11 12:18, Lex Trotman wrote:
On 1 June 2011 08:59, Stargazer<[email protected]> wrote:
Hi,
Given this input (no spaces):
6. this\`abc`
7. this\+abc+
Is this the correct output:
6. this\<tt>abc</tt>
7. this+abc+
I expected the backtick and plus to produce the same output, given
there is no whitespace and this is just plain text. It is like the
backtick treated the backslash as common punctuation, but the plus did
not. For another test, I changed the backslash to a comma, and the
output was the same for both (like #6). I read the FAQ and Chapter
7.
Is the above working as designed? Why the difference?
Hi,
I'd say its a bug. What is happening is this:
Asciidoc processes quotes in order and happens to process the ` ' pair
before the ` ` pair. It removes the \ when looking for ` ' thus
exposing the ` ` pair. The + is only ever part of one quotes pair so
it doesn't have the problem.
One solution is to leave the \es until all quotes are processed, then
substitute them. This particular problem can occur when the user
defines custom quotes as well so it can't just be special cased. Any
better ideas Stuart?
I would characterize this as an idiosyncrasy rather than a bug. Start entering
unusual character sequences and you won't have dig very deep to find more cases
like this.
AsciiDoc is not based on a well defined grammar like XML -- there is no simple
set of inviolable rules. The AsciiDoc markup was not designed, it just grew
holistically over time, use-case by use-case, a bit like the way human language
evolves -- it's full of junk DNA and idiosyncrasies. This is not to say that it
has no underlying structure or aesthetic sensibility, it's just that its domain
is typography not computing. Human and machine document processing work
completely differently, if they didn't we'd all be reading well formed XML, and
it goes a long way to explaining why, at first glance, computer typographic
software systems often appear to be incoherent sprawling muddles.
But I'm starting to ramble.
Cheers, Stuart
Cheers
Lex
Thank you.
Peg Russell
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.