Hi, I don't have time ATM to look in detail, but a couple of comments/suggestions below.
On 16 July 2017 at 10:53, Ken McGlothlen <[email protected]> wrote: > 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|indexterm|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: How do you know it works "just fine", maybe use a really simple substitution in the output to see if it really does. The fact that the .net appears after the </a> suggest it may not be. > > > [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: What does a backslash before the @ do? > > [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. Only unicodeisms, but that shouldn't affect this. Cheers Lex > > 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. -- 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.
