public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Frank Bergmann <pandoc-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Frank Bergmann <pandoc-eSlkCAlw8VwAvxtiuMwx3w@public.gmane.org>
Subject: Re: "double emphasis" bug when converting to asciidoc?
Date: Wed, 5 Jan 2022 09:39:12 +0100	[thread overview]
Message-ID: <695408e4-ba64-571f-42d2-be6fda24a8b1@tuxad.com> (raw)
In-Reply-To: <m2v8yzpb5x.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>

Hi,

that's awesome - thank you for the quick and great answer, John.
I was not aware of the intraword marking. I'll check the specs if it is 
an undesired behaviour of asciidoc or maybe pandoc and then submit a bug 
accordingly.

cheers,
Frank

On 04.01.22 20:12, John MacFarlane 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.

-- 
Frank Bergmann, Pödinghauser Str. 5, D-32051 Herford, Tel. +49-5221-9249753
SAP Hybris & Linux LPIC-3, E-Mail tx2014-VEyjnN4Vo9k@public.gmane.org, USt-IdNr DE237314606
http://tdyn.de/freel  -- Redirect to profile at freelancermap
http://www.gulp.de/freiberufler/2HNKY2YHW.html  -- Profile at GULP

-- 
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/695408e4-ba64-571f-42d2-be6fda24a8b1%40tuxad.com.


      parent reply	other threads:[~2022-01-05  8:39 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
     [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       ` Frank Bergmann [this message]

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=695408e4-ba64-571f-42d2-be6fda24a8b1@tuxad.com \
    --to=pandoc-eslkcalw8vwavxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@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).