* Converting Markdown to HTML generates unexpected html tags
@ 2021-06-17 14:21 James
[not found] ` <deb28ccc-a17a-4b89-873d-34abb0551a44n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: James @ 2021-06-17 14:21 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1360 bytes --]
I am new in using pandoc and I am trying to convert a markdown document to
HTML. Inside it I have a bunch of html tags to sort out 2 images into two
side by side columns. However when I convert it from Markdown to HTML the
<img> tags changes to <pre><code> tags. Is this normal? Am I missing
anything out? Below is what I meant.
From in Markdown
<div class="row">
<div class="column">
<img src="img1.jpg" style="width:50%"></img>
</div>
<div class="column">
<img src="img2.jpg" style="width:50%"></img>
</div>
</div>
To in HTML
<div class="row">
<div class="column">
<pre><code><img src="img1.jpg"
style="width:50%"></img></code></pre>
</div>
<div class="column">
<pre><code><img src="img2.jpg"
style="width:50%"></img></code></pre>
</div>
</div>
I am using pandoc 1.19.2.4 compiled with pandoc-types 1.17.0.5, texmath
0.9.4.4, skylighting 0.3.3.1
Thanks !
--
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/deb28ccc-a17a-4b89-873d-34abb0551a44n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2239 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Converting Markdown to HTML generates unexpected html tags
[not found] ` <deb28ccc-a17a-4b89-873d-34abb0551a44n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-06-17 17:38 ` Daniel Staal
[not found] ` <6c7b0012-6f63-6cd7-693c-b19e9ef0a9fd-Jdbf3xiKgS8@public.gmane.org>
2021-06-18 3:57 ` James
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Staal @ 2021-06-17 17:38 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
On 6/17/21 10:21 AM, James wrote:
> I am new in using pandoc and I am trying to convert a markdown document
> to HTML. Inside it I have a bunch of html tags to sort out 2 images into
> two side by side columns. However when I convert it from Markdown to
> HTML the <img> tags changes to <pre><code> tags. Is this normal? Am I
> missing anything out? Below is what I meant.
>
> From in Markdown
>
> <div class="row">
> <div class="column">
> <img src="img1.jpg" style="width:50%"></img>
> </div>
> <div class="column">
> <img src="img2.jpg" style="width:50%"></img>
> </div>
> </div>
>
Your problem here is the indentation - for the img tags you're indenting
by 4 spaces, which by Markdown rules is a verbatim code block:
https://pandoc.org/MANUAL.html#indented-code-blocks
Just remove the indentation at the beginning of the lines and you'll be
fine.
Daniel T. Staal
--
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
--
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/6c7b0012-6f63-6cd7-693c-b19e9ef0a9fd%40usa.net.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Converting Markdown to HTML generates unexpected html tags
[not found] ` <6c7b0012-6f63-6cd7-693c-b19e9ef0a9fd-Jdbf3xiKgS8@public.gmane.org>
@ 2021-06-17 20:06 ` John MacFarlane
0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-06-17 20:06 UTC (permalink / raw)
To: Daniel Staal, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
Or, you can disable the markdown_in_html_blocks extension:
pandoc -f markdown-markdown_in_html_blocks
Daniel Staal <DStaal-Jdbf3xiKgS8@public.gmane.org> writes:
> On 6/17/21 10:21 AM, James wrote:
>> I am new in using pandoc and I am trying to convert a markdown document
>> to HTML. Inside it I have a bunch of html tags to sort out 2 images into
>> two side by side columns. However when I convert it from Markdown to
>> HTML the <img> tags changes to <pre><code> tags. Is this normal? Am I
>> missing anything out? Below is what I meant.
>>
>> From in Markdown
>>
>> <div class="row">
>> <div class="column">
>> <img src="img1.jpg" style="width:50%"></img>
>> </div>
>> <div class="column">
>> <img src="img2.jpg" style="width:50%"></img>
>> </div>
>> </div>
>>
>
> Your problem here is the indentation - for the img tags you're indenting
> by 4 spaces, which by Markdown rules is a verbatim code block:
> https://pandoc.org/MANUAL.html#indented-code-blocks
>
> Just remove the indentation at the beginning of the lines and you'll be
> fine.
>
> Daniel T. Staal
>
> --
> ---------------------------------------------------------------
> This email copyright the author. Unless otherwise noted, you
> are expressly allowed to retransmit, quote, or otherwise use
> the contents for non-commercial purposes. This copyright will
> expire 5 years after the author's death, or in 30 years,
> whichever is longer, unless such a period is in excess of
> local copyright law.
> ---------------------------------------------------------------
>
> --
> 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/6c7b0012-6f63-6cd7-693c-b19e9ef0a9fd%40usa.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/m2k0ms1cjj.fsf%40MacBook-Pro-2.hsd1.ca.comcast.net.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Converting Markdown to HTML generates unexpected html tags
[not found] ` <deb28ccc-a17a-4b89-873d-34abb0551a44n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-17 17:38 ` Daniel Staal
@ 2021-06-18 3:57 ` James
1 sibling, 0 replies; 4+ messages in thread
From: James @ 2021-06-18 3:57 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1567 bytes --]
Thank you for the suggestions! I tried them, and it is working accordingly
now.
On Thursday, June 17, 2021 at 10:21:43 PM UTC+8 James wrote:
> I am new in using pandoc and I am trying to convert a markdown document to
> HTML. Inside it I have a bunch of html tags to sort out 2 images into two
> side by side columns. However when I convert it from Markdown to HTML the
> <img> tags changes to <pre><code> tags. Is this normal? Am I missing
> anything out? Below is what I meant.
>
> From in Markdown
>
> <div class="row">
> <div class="column">
> <img src="img1.jpg" style="width:50%"></img>
> </div>
> <div class="column">
> <img src="img2.jpg" style="width:50%"></img>
> </div>
> </div>
>
> To in HTML
>
> <div class="row">
> <div class="column">
> <pre><code><img src="img1.jpg"
> style="width:50%"></img></code></pre>
> </div>
> <div class="column">
> <pre><code><img src="img2.jpg"
> style="width:50%"></img></code></pre>
> </div>
> </div>
>
> I am using pandoc 1.19.2.4 compiled with pandoc-types 1.17.0.5, texmath
> 0.9.4.4, skylighting 0.3.3.1
> Thanks !
>
--
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/dab1aa04-8597-4fe1-8bd7-64f085a0b647n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 2667 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-18 3:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 14:21 Converting Markdown to HTML generates unexpected html tags James
[not found] ` <deb28ccc-a17a-4b89-873d-34abb0551a44n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-06-17 17:38 ` Daniel Staal
[not found] ` <6c7b0012-6f63-6cd7-693c-b19e9ef0a9fd-Jdbf3xiKgS8@public.gmane.org>
2021-06-17 20:06 ` John MacFarlane
2021-06-18 3:57 ` James
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).