allow extensions to use ! and ^ as special characters#30
Conversation
|
I split off a change from #28 into this branch so that |
4c40013 to
2cd664e
Compare
1e705e9 to
46bda92
Compare
|
I've rebased this PR atop the new updates in #29. |
2cd664e to
131078b
Compare
| push_bracket(subj, IMAGE, new_inl); | ||
| } | ||
| break; | ||
| default: |
There was a problem hiding this comment.
What happenned to the default case? Did you just push it outside the switch?
There was a problem hiding this comment.
Yes. I had to move the try_extensions call outside of this switch, so that it could be tried with characters that are part of the built-in grammar (specifically ^ and [). That's also why i modified the ! and ^ branches to peek for their syntax instead of eagerly advancing the pointer.
46bda92 to
05a5f22
Compare
| case '!': | ||
| advance(subj); | ||
| if (peek_char(subj) == '[' && peek_char_n(subj, 1) != '^') { | ||
| if (peek_char_n(subj, 1) == '[' && peek_char_n(subj, 2) != '^') { |
There was a problem hiding this comment.
Maybe add a comment saying that this case is not effectively "![(!^)"
daniel-grumberg
left a comment
There was a problem hiding this comment.
LGTM after offline discussion
- generalize the special-character-inline-creating section - add comments about looking for images and attributes specificall
d9b0520 to
76ae837
Compare
While implementing updates for #28, and while verifying changes for #29, i noticed that some special characters weren't being handled properly, and couldn't be used by extensions. This updates the
parse_inlinefunction to allow^and!to be used as special characters by extensions. This also allows footnotes to work with our implementation of inline attributes, allowing the full test suite to pass.