public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Leonard Rosenthol
	<leonardr-bM6h3K5UM15l57MIdRCFDg@public.gmane.org>,
	pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Frank Bergmann <pandoc-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org>
Subject: Re: "double emphasis" bug when converting to asciidoc?
Date: Tue, 04 Jan 2022 19:17:42 -0800	[thread overview]
Message-ID: <m2pmp6q3ah.fsf@MacBook-Pro-2.hsd1.ca.comcast.net> (raw)
In-Reply-To: <CALu=v3JE2PPCY8=agCY9wtvwrMKXAidpSVFN650oc+Hge8J3dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


That's helpful.  Please submit a bug report at
https://github.com/jgm/pandoc/issues

Leonard Rosenthol <leonardr-bM6h3K5UM15l57MIdRCFDg@public.gmane.org> writes:

> The AsciiDoc specs on emphasis/italics is here -
> https://docs.asciidoctor.org/asciidoc/latest/text/italic/ - and talks about
> the intraword scenario.
>
> Hope that helps.
>
> Leonard
>
> On Tue, Jan 4, 2022 at 2:13 PM John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>>
>> I see this in the code:
>>
>> inlineToAsciiDoc opts (Emph lst) = do
>>   contents <- inlineListToAsciiDoc opts lst
>>   isIntraword <- gets intraword
>>   let marker = if isIntraword then "__" else "_"
>>   return $ marker <> contents <> marker
>>
>>
>> So apparently in asciidoc you use __ for intraword emphasis
>> (I don't use asciidoc myself).
>>
>> The problem may be that this is a context asciidoc doesn't
>> consider "intraword."
>>
>> Anyway, please submit a bug report and link here.
>>
>> Frank Bergmann <pandoc-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org> writes:
>>
>> > Hi,
>> >
>> > I found a strange behaviour when converting some HTML files to asciidoc.
>> >
>> > Versions used:
>> > asciidoc 9.1.0
>> > pandoc 2.16.2
>> >
>> > Example input:
>> >
>> > <!DOCTYPE HTML>
>> > <html>
>> > <head>
>> > <title>Xx</title>
>> > </head>
>> > <body>
>> > <a href="x.htm"><i>Xx</i></a><i>,</i>
>> > </body>
>> > </html>
>> >
>> > With "pandoc --wrap=none -f html -t asciidoc" I get this asciidoc output:
>> >
>> > link:x.htm[_Xx_]__,__
>> >
>> > The double underscores look "suspicious" and with "asciidoc -b
>> > docbook;xmllint" I get:
>> >
>> > z.xml:10: parser error : Unescaped '<' not allowed in attributes values
>> > <simpara>link:x.htm<emphasis><phrase
>> > role="<emphasis>Xx</emphasis>">,</phrase></
>> >
>> > The related docbook line which was created by asciidoc:
>> >
>> > <simpara>link:x.htm<emphasis><phrase
>> > role="<emphasis>Xx</emphasis>">,</phrase></emphasis></simpara>
>> >
>> > *Is this a known bug?*
>> >
>> >
>> > If I add a space before comma...
>> >
>> > <a href="x.htm"><i>Xx</i></a><i> ,</i>
>> >
>> > then I get
>> >
>> > link:x.htm[_Xx_] _,_
>> >
>> > which causes no issue. Also adding a space before the emphasis...
>> >
>> > <a href="x.htm"><i>Xx</i></a> <i>,</i>
>> >
>> > create an asciidoc file which can be rendered:
>> >
>> > link:x.htm[_Xx_] _,_
>> >
>> >
>> >
>> > Does someone know this? Does a fix already exist?
>> >
>> >
>> > cheers,
>> > Frank
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "pandoc-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/3f7b920b-c982-5be5-fa04-9025e008e518%40tuxad.com
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/m2v8yzpb5x.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net
>> .
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CALu%3Dv3JE2PPCY8%3DagCY9wtvwrMKXAidpSVFN650oc%2BHge8J3dw%40mail.gmail.com.


  parent reply	other threads:[~2022-01-05  3:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 18:02 Frank Bergmann
     [not found] ` <3f7b920b-c982-5be5-fa04-9025e008e518-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org>
2022-01-04 19:12   ` John MacFarlane
     [not found]     ` <m2v8yzpb5x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2022-01-04 19:50       ` Leonard Rosenthol
     [not found]         ` <CALu=v3JE2PPCY8=agCY9wtvwrMKXAidpSVFN650oc+Hge8J3dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-01-05  3:17           ` John MacFarlane [this message]
     [not found]             ` <m2pmp6q3ah.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2022-01-05 17:19               ` Frank Bergmann
2022-06-25  9:34               ` Translating style sheets in reader on HTML input Frank Bergmann
     [not found]                 ` <c09f254c-5ccf-1ed4-97ab-4e6bccbbdcb6-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org>
2022-06-25 11:23                   ` William Lupton
     [not found]                     ` <CAEe_xxh02ZZ_HbZS0cPDZ4rWE+ES5zYJQsa4Uw9_bTBX5aEAVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-28 11:56                       ` Frank Bergmann
2022-01-05  8:39       ` "double emphasis" bug when converting to asciidoc? Frank Bergmann

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=m2pmp6q3ah.fsf@MacBook-Pro-2.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=leonardr-bM6h3K5UM15l57MIdRCFDg@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=pandoc-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org \
    /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).