Looks like it might be a bug.... anyone else?

On Wed, 13 Jul 2022 at 17:14, Sukil Etxenike arizaleta <sukiletxe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi,

I've tried it too, and it gives the same results. I don't know why this happens.

Regards,

Sukil


El 13/07/2022 a las 17:01, A A escribió:

Dear Sukil,

So I believe only commonmark_x provides the non-default attributes extension. It’s not included in commonmark, I don’t think.

So I tried with commonmark_x on the following code:

---
title: my title
author: bob marley
---

# Header {#identifier .class key=value}

Some text

{#special .glossary}
Term 1
: Definition 1

Term 2
: Definition 2

with the following command:

pandoc -f commonmark_x -t html .\definition-lists.md

But i’m still not getting the attributes added to the <dl> element:

<h1 class="class" data-key="value" id="identifier">Header</h1>
<p>Some text</p>
<dl>
<dt>Term 1</dt>
<dd>
Definition 1
</dd>
<dt>Term 2</dt>
<dd>
Definition 2
</dd>
</dl>

The other option is to maybe use the fenced_divs extension with regular markdown, but I’m trying to see if there’s a more generic way.

Regards,

Amine


On Wed, 13 Jul 2022 at 16:42, Sukil Etxenike arizaleta <sukiletxe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

Hi,

OK, technically it doesn't say it cannot be done, it only says that this syntax is only available in headers, divs, spans, links and images.

But wait, checking non-default extensions, if you convert from commonmark or commonmark_x you can use this syntax with any element of the AST. Technically it wuld add an enclosing div, too.

This, however, wouldn't let you enable other extensions, check --list-extensions=commonmark etc. to see if this would suit you.

Hth,

Sukil


El 13/07/2022 a las 16:32, A A escribió:
Hi Sukil,

Thanks for your quick response, but where in the manual does it say that this cannot be done? I was under the impression that using the braced syntax to add attributes was a sort of universal thing that could be done to any of the elements in the AST?

Regards,

Amine

On Wed, 13 Jul 2022 at 16:29, Sukil Etxenike arizaleta <sukiletxe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

According to the manual: no, but you can enclose it in a div and give that div the attributes you want.

Hth,

Sukil


El 13/07/2022 a las 16:18, A A escribió:

Dear All,

I would like to ask whether it is possible to assign attributes, identifiers or key-value pairs to definition lists as follows in pandoc:

---
title: my title
author: bob marley
---

# Header {#identifier .class key=value}

Some text

{.glossary}
Term 1
: Definition 1

Term 2
: Definition 2

Compiling the above with pandoc -f markdown -t html .\definition-lists.md generates the following:

<h1 class="class" data-key="value" id="identifier">Header</h1>
<p>Some text</p>
<p>{.glossary} Term 1 : Definition 1</p>
<dl>
<dt>Term 2</dt>
<dd>
Definition 2
</dd>
</dl>

The attributes on the header are getting picked up by pandoc, but not on the definition list. What am I doing wrong here?

Regards,

Amine

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOyf796%3DsXy5Zt%2BT1Z0MZqXyLZS-YJCqRWRCkzyF-Lh_g%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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6a4255a0-557b-a182-43a8-35facb1e2788%40gmail.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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgOYU8Z6XZ6uMxZ5t1-47OV7FKR7640O2hSb_VHStu3yAw%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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b187e3c4-0026-1853-d18f-86cedce39191%40gmail.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPPQCVG_xQfVoQD7nPqaU8ObZd%2BcM5gcqEXuuy3ouPBFw%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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fa49db14-b03b-f29d-32bc-daf4b80d6b39%40gmail.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgMECRkn7n5G3cj%2Bi%3DimJuUZeciPN82mVQAZZtPc7yJqRA%40mail.gmail.com.