public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* md->asciidoc inline code has plus signs
@ 2019-09-04 21:22 Miguel Gualdrón
       [not found] ` <CACu41f-KRNwFta3a=iiOvG8-RH7LUSWdKT4k5P-BTR7M+ks8hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Miguel Gualdrón @ 2019-09-04 21:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

Hi,

I've searched the archive for this, but wasn't able to find it.

I'm using pandoc 2.7.3 under Mac OS X to convert docs from Markdown to
Asciidoc.  Some of these may later be converted to HTML and/or PDF.

The issue is that when converting inline code, pandoc surrounds the text
with back-ticks AND plus signs, but both are not required by asciidoc, only
one or the other.  So the question is:  how do I get the plus signs to go
away?

Here's a trivial example:

echo 'Normal text `this is code`' |pandoc - -o- -f markdown -t asciidoc
Normal text `+this is code+`


If this output is then converted to HTML, the plus signs are rendered as if
they had been part of the original text:

echo 'Normal text `this is code`' |pandoc - -o- -f markdown -t asciidoc
|asciidoc -o- -b xhtml11 -
<div id="content">
<div class="paragraph"><p>Normal text <code>+this is code+</code></p></div>
</div>


(I've omitted some of the HTML output for clarity.)

Thanks in advance for any help.

-- 
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/CACu41f-KRNwFta3a%3DiiOvG8-RH7LUSWdKT4k5P-BTR7M%2Bks8hw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 2428 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: md->asciidoc inline code has plus signs
       [not found] ` <CACu41f-KRNwFta3a=iiOvG8-RH7LUSWdKT4k5P-BTR7M+ks8hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-09-04 21:45   ` John MacFarlane
       [not found]     ` <yh480kr24vn3b9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2019-09-04 21:45 UTC (permalink / raw)
  To: Miguel Gualdrón, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Interesting, this seems to work differently in asciidoc and
asciidoctor (in asciidoctor you get the expected output).

Here's the commit that added this:

commit 98ee6ca289ad7117b7336a57bcfc6f4b54463f4e
Author: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
Date:   Sun May 5 21:57:30 2019 -0700

    Asciidoc writer: use `` `+...+` `` form for inline code.
    
    The old `` `a__b__c` `` yields emphasis inside code in asciidoc.
    To get a pure literal code span, use `` `+a__b__c+` ``.

Looks like this behavior is asciidoctor-specific.
Could you put an issue on our tracker so we won't forget
to fix this?  It should be easy enough to make the `+`s
conditional on the asciidoctor extension.

PS.  I get annoyed when I see online forums talking about how
asciidoc is superior to markdown because there aren't
N+1 versions!

Miguel Gualdrón <dev-A7JrOCSl3gJWk0Htik3J/w@public.gmane.org> writes:

> Hi,
>
> I've searched the archive for this, but wasn't able to find it.
>
> I'm using pandoc 2.7.3 under Mac OS X to convert docs from Markdown to
> Asciidoc.  Some of these may later be converted to HTML and/or PDF.
>
> The issue is that when converting inline code, pandoc surrounds the text
> with back-ticks AND plus signs, but both are not required by asciidoc, only
> one or the other.  So the question is:  how do I get the plus signs to go
> away?
>
> Here's a trivial example:
>
> echo 'Normal text `this is code`' |pandoc - -o- -f markdown -t asciidoc
> Normal text `+this is code+`
>
>
> If this output is then converted to HTML, the plus signs are rendered as if
> they had been part of the original text:
>
> echo 'Normal text `this is code`' |pandoc - -o- -f markdown -t asciidoc
> |asciidoc -o- -b xhtml11 -
> <div id="content">
> <div class="paragraph"><p>Normal text <code>+this is code+</code></p></div>
> </div>
>
>
> (I've omitted some of the HTML output for clarity.)
>
> Thanks in advance for any help.
>
> -- 
> 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/CACu41f-KRNwFta3a%3DiiOvG8-RH7LUSWdKT4k5P-BTR7M%2Bks8hw%40mail.gmail.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/yh480kr24vn3b9.fsf%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: md->asciidoc inline code has plus signs
       [not found]     ` <yh480kr24vn3b9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-09-04 21:51       ` John MacFarlane
       [not found]         ` <yh480kftlbn30k.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2019-09-04 21:51 UTC (permalink / raw)
  To: Miguel Gualdrón, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Don't worry about putting up an issue, I'll just
fix it now since it's easy.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: md->asciidoc inline code has plus signs
       [not found]         ` <yh480kftlbn30k.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-09-05 13:34           ` Miguel Gualdrón
  0 siblings, 0 replies; 4+ messages in thread
From: Miguel Gualdrón @ 2019-09-05 13:34 UTC (permalink / raw)
  To: John MacFarlane; +Cc: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

Thank you for the quick response.

On Wed, Sep 4, 2019 at 4:52 PM John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

>
> Don't worry about putting up an issue, I'll just
> fix it now since it's easy.
>
>

-- 
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/CACu41f8sB4U_KXQnY7BosryNxWh7KyGVncGJ4SJczwqxjSGGjQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 1242 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-05 13:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 21:22 md->asciidoc inline code has plus signs Miguel Gualdrón
     [not found] ` <CACu41f-KRNwFta3a=iiOvG8-RH7LUSWdKT4k5P-BTR7M+ks8hw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-04 21:45   ` John MacFarlane
     [not found]     ` <yh480kr24vn3b9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-09-04 21:51       ` John MacFarlane
     [not found]         ` <yh480kftlbn30k.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-09-05 13:34           ` Miguel Gualdrón

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).