public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Multi-paragraph anchor in HTML
Date: Fri, 18 Mar 2022 21:55:43 +0000	[thread overview]
Message-ID: <YjT/3wcc1KerYnG6@localhost> (raw)
In-Reply-To: <51e46a71-c669-4e1a-8074-cebcbad6c068n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

As for your first question, you can achieve this by inserting these tags as raw blocks:

```{=html}
<a href="#top">
```

# Heading

Paragraph

```{=html}
</a>
```

Le Friday 18 March 2022 à 10:03:28AM, Pi Fisher a écrit :
> Hello,
> 
> I'm trying to write some markdown that, when compiled to HTML, will give me an
> anchor tag that covers multiple paragraphs (and a couple headings). Because the
> markdown for an anchor (`[link text](link-target)`) doesn't support multiple
> paragraphs, I'm using raw HTML tags. Here's an example of what I'm trying to
> do.
> 
> Input:
> ``````markdown
> <a href="#top">
> 
> # Heading
> 
> Paragraph
> 
> </a>
> ``````
> 
> Desired output:
> ``````html
> <a href="#top">
> <h1 id="heading">Heading</h1>
> <p>Paragraph</p>
> </a>
> ``````
> 
> Real output:
> ``````html
> <p><a href="#top"></p>
> <h1 id="heading">Heading</h1>
> <p>Paragraph</p>
> <p></a></p>
> ``````
> 
> Is there a way to achieve what I'm trying to get? Possibly a way to say "don't
> wrap this line in a paragraph", or maybe an extension that allows for
> multi-paragraph links?
> 
> --
> 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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/51e46a71-c669-4e1a-8074-cebcbad6c068n%40googlegroups.com.
> 
> References:
> 
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.google.com/d/msgid/pandoc-discuss/51e46a71-c669-4e1a-8074-cebcbad6c068n%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/YjT/3wcc1KerYnG6%40localhost.


  parent reply	other threads:[~2022-03-18 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 17:03 Pi Fisher
     [not found] ` <51e46a71-c669-4e1a-8074-cebcbad6c068n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-03-18 21:55   ` Bastien DUMONT [this message]
2022-03-18 22:08     ` Gwern Branwen
     [not found]       ` <CAMwO0gxOdcUTUkn=GCQ5kWnczT+CGmZi1bC6Oo9abywg7BxfOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-03-18 22:58         ` Pi Fisher

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=YjT/3wcc1KerYnG6@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@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).