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

Key-value attributes are not general enough #62

Closed
Omikhleia opened this issue Feb 11, 2023 · 0 comments · Fixed by #68
Closed

Key-value attributes are not general enough #62

Omikhleia opened this issue Feb 11, 2023 · 0 comments · Fixed by #68

Comments

@Omikhleia
Copy link
Contributor

Omikhleia commented Feb 11, 2023

The syntax for attribute values in key-value pairs ({ .... key=value } attributes) is not general enough:

parsers.attrvalue = (parsers.dquote * C((parsers.alphanumeric + S("._- "))^1) * parsers.dquote)
+ C((parsers.alphanumeric + S("._-"))^1)

FWIW, Pandoc allows more things:
https://github.com/jgm/pandoc/blob/bc670665a1ce18ddc48531867b7b77c2f3493f49/src/Text/Pandoc/Readers/Markdown.hs#L658-L662

I am not reading Haskell well, but at least:

  • single quoted value key='value'
  • some escaping things
  • wider range of characters (i.e. not restricted as currently to alphanums and some additions).

Found the issue while trying to have a width="15%" attribute pair ;)

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 a pull request may close this issue.

1 participant