There've been a few times when formatting email addresses using AsciiDoc where the @-sign just looks . . . off. Too high, or too cramped, or too weird. Some really beautiful fonts just have some really bad characters, and the @-sign seems to suffer in a lot of them.
So I wanted to put an extra <span> around the @-sign so that it could be formatted differently using CSS; margin adjustments, or position adjustments, or different font, what have you. But I've run into a mystifying issue that I don't understand. First off, from the [macros] section, I reworked the macros like this: (?su)(?<!\w)[ \\]?(?P<name>http|https|ftp|file|irc|tel|image|link|anchor|xref|in dexterm|indexterm2):(?P<target>\S*?)\[(?P<attrlist>.*?)(?<!\\)\]= (?su)(?<!\w)[ \\]?(?P<name>mailto):(?P<targetu>[^\s@]+?)[@](?P<targeth>[\S]+?)\[ (?P<attrlist>.*?)(?<!\\)\]= That seems to work just fine. But in the html5 backend, it gets formatted like this: [mailto-inlinemacro] <a class="email" href="mailto:{targetu}@{targeth}">{0=<span class="email">{targetu}<span class="at">@</span>{targeth}</span>}</a> and herein lies the problem. The @-sign, specifically. If I specify an email like this in an AsciiDoc source file: mailto:[email protected][] and compile it with these configuration lines, it comes out like this: <a class="email" <a href="mailto:href=" mailto:somebody@wherever"><span class="email">href="mailto:somebody<span class="at">@</span>"wherever"</span></a>.net"> but if I put, say, an asterisk after the @-sign in the mailto: part in the inlinemacro, it comes out fine: [mailto-inlinemacro] <a class="email" href="mailto:{targetu}@*{targeth}">{0=<span class="email">{targetu}<span class="at">@</span>{targeth}</span>}</a> <a class="email" href="mailto:somebody@*wherever.net"><span class="email">somebody<span class="at">@</span>wherever.net</span></a> Clearly, this isn't going to work as a clickylink, but it does show that it works properly under this circumstance. Note that this doesn't work if I replace the asterisk with an alphabetic character; it needs to be punctuation (parentheses work, periods work, and so on). I thought initially that it might be a Pythonism, but it shouldn't be one in Python 2.7. So, any idea why this might be happening? -- You received this message because you are subscribed to the Google Groups "asciidoc" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/asciidoc. For more options, visit https://groups.google.com/d/optout.
