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

fix: Pandoc-like attributes are too restrictive #68

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

Omikhleia
Copy link
Contributor

@Omikhleia Omikhleia commented May 9, 2023

Closes #62

Carefully reading Pandoc's code, I hope I got it right now:

  1. attributes key=value pairs
    • The key must start with a letter, followed by alphanumeric characters or _-:. (rather than just _-)
    • The value may be double-quoted or single-quoted, and has less restrictions (than initially implemented)
  2. class .class identifiers
    • Same rule as for attribute keys
  3. hash #id identifiers
  4. raw =raw attributes
    • They have yet another syntax, consisting in alphanums and _- only

@Witiko
Copy link
Collaborator

Witiko commented May 15, 2023

Independently implemented 1 and 2 in Witiko#297. 3 and 4 are a good catch and I will be porting them to witiko/markdown in Witiko#304, possibly catching some further bugs in the process. In the meantime: can you please extend the unit tests for fenced code attributes and raw attributes with some examples to prevent future regressions?

@Witiko Witiko merged commit 8e8c309 into jgm:master Aug 25, 2023
2 checks passed
@Omikhleia Omikhleia deleted the fix-pandoc-like-attributes branch February 26, 2024 01:09
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

Successfully merging this pull request may close these issues.

Key-value attributes are not general enough
2 participants