public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: reStructuredText: Converting to HTML wraps 'lang' value in tags
Date: Wed, 4 Oct 2023 11:35:26 -0700	[thread overview]
Message-ID: <1E29A7CE-5768-4171-988B-D77001CE1D61@gmail.com> (raw)
In-Reply-To: <20231002194658.6950c944@shasta>

That's not a known bug -- but it is clearly a bug.
Could you put up an issue on our GitHub bug tracker, jgm/pandoc?
Thanks!

> On Oct 2, 2023, at 7:46 PM, Ben Hancock <lists-2Dqnj5qYfKrvQC8VwISyQA@public.gmane.org> wrote:
> 
> Hi fellow pandoc users:
> 
> I'm converting reStructuredText to HTML using the standalone option,
> and finding that setting the 'lang' metadata actually wraps the value
> of the field in HTML tags. Here's an example session:
> 
> 	$ cat test.rst
> 	===========
> 	A Test File
> 	===========
> 
> 	:Author: Myself
> 	:lang: en-US
> 
> 	A Wonderful Chapter
> 	===================
> 
> 	In which I expound the virtues of reStructuredText ...
> 
> 	$ pandoc -s -f rst -t html test.rst | head -n 2
> 	<!DOCTYPE html>
> 	<html xmlns="http://www.w3.org/1999/xhtml" lang="<p>en-US</p>" xml:lang="<p>en-US</p>">
> 
> 	$ pandoc --version
> 	pandoc 2.14.0.3
> 
> Note in particular the `<p>` tags in `lang="<p>en-US</p>" xml:lang="<p>en-US</p>">`.
> 
> Nothing appears wrong with the template:
> 
> 	$ pandoc -D html | head -n 2
> 	<!DOCTYPE html>
> 	<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
> 
> ... and Markdown works fine:
> 
> 	$ cat test.md
> 	---
> 	title: A Test File
> 	lang: en-US
> 	---
> 
> 	## A Wonderful Chapter
> 
> 	In which I expound the virtues of Markdown ...
> 
> 	$ pandoc -s test.md | head -n 2
> 	<!DOCTYPE html>
> 	<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
> 
> Any ideas? Is this a known bug, or have I done something wrong?
> 
> Cheers,
> 
> - Ben
> 
> -- 
> 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/20231002194658.6950c944%40shasta.


      reply	other threads:[~2023-10-04 18:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  2:46 Ben Hancock
2023-10-04 18:35 ` John MacFarlane [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=1E29A7CE-5768-4171-988B-D77001CE1D61@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@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).