Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use html comments to add extensions #4961

Closed
legrostdg opened this issue Oct 9, 2018 · 4 comments
Closed

use html comments to add extensions #4961

legrostdg opened this issue Oct 9, 2018 · 4 comments

Comments

@legrostdg
Copy link

#2069 was closed, but I think that @lierdakil had a great idea: use html comments to add extensions. Something like this:

<!-- pandoc-markdown: +compact_definition_lists -->

That would be a nice feature to have in pandoc.

@mb21
Copy link
Collaborator

mb21 commented Oct 9, 2018

I guess this falls under #4627 ?

@mb21
Copy link
Collaborator

mb21 commented Oct 9, 2018

E.g. with panrun you can do panrun input.md using:

---
output:
  html:
    from: 'markdown+compact_definition_lists'
    to: html
---

Term 1
  ~ Definition 1
Term 2
  ~ Definition 2a
  ~ Definition 2b

@jgm
Copy link
Owner

jgm commented Oct 9, 2018

If we did this at all, I think it would make more
sense to have a YAML metadata field:

---
extensions: +compact_definition_lists -pipe_tables
...

One possible problem with this is that parsing YAML
metadata is itself an extension. So is parsing raw
HTML (including comments).

We'd also have to change the parser to keep extensions
in state, and possibly modify them on the fly, rather
than getting them from reader options.

@mb21
Copy link
Collaborator

mb21 commented Oct 16, 2018

Closing in favour of #4627

@mb21 mb21 closed this as completed Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants