Skip to content

Conversation

@gjtorikian
Copy link
Collaborator

Should close #106.

I haven't quite figured out how the parser should "write" to the resulting string, hence the draft state. Ideally the diff looks something like:

diff --git a/src/parser/inlines.rs b/src/parser/inlines.rs
index 28a1235..4732464 100644
--- a/src/parser/inlines.rs
+++ b/src/parser/inlines.rs
@@ -149,7 +149,22 @@ impl<'a, 'r, 'o, 'd, 'i, 'c, 'subj> Subject<'a, 'r, 'o, 'd, 'i, 'c, 'subj> {
                 }
             }
             '~' if self.options.extension.strikethrough => Some(self.handle_delim(b'~')),
-            '^' if self.options.extension.superscript => Some(self.handle_delim(b'^')),
+            '^' if self.options.extension.superscript => {
+                if !self.within_brackets {
+                    Some(self.handle_delim(b'^'))
+                } else {
+                    // something
+               }

@gjtorikian gjtorikian self-assigned this Jan 23, 2023
@gjtorikian gjtorikian marked this pull request as ready for review January 25, 2023 00:52
@gjtorikian
Copy link
Collaborator Author

xref gjtorikian/commonmarker#217 fyi @DannyBen

@kivikakk
Copy link
Owner

Awesome — thank you!

@kivikakk kivikakk merged commit 7759912 into main Jan 25, 2023
@kivikakk kivikakk deleted the super-footnote branch January 25, 2023 02:56
@gjtorikian
Copy link
Collaborator Author

Would it be possible to cut a new release with this? Thank you!

kivikakk added a commit to digitalmoksha/comrak that referenced this pull request Jan 25, 2023
@kivikakk
Copy link
Owner

Of course — underway.

kivikakk added a commit to digitalmoksha/comrak that referenced this pull request Jan 25, 2023
@kivikakk
Copy link
Owner

This is 0.16.0 on crates.io!

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.

footnotes plus superscript interact weirdly

3 participants