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

feat: add footnote support #94

Merged
merged 5 commits into from
Jan 29, 2024
Merged

feat: add footnote support #94

merged 5 commits into from
Jan 29, 2024

Conversation

deer
Copy link
Contributor

@deer deer commented Jan 21, 2024

closes #6

Someone created a marked extension late last year. I guess it works well enough. For the test I basically just took the example from upstream: https://raw.githubusercontent.com/bent10/marked-extensions/main/packages/footnote/test/fixtures/example.md

@hashrock, please take a look.

@hashrock
Copy link
Contributor

Thank you!

image

I tried the Example, but the link doesn't seem to work. The backlink is working, so there might be interference with the existing renderer.

@deer
Copy link
Contributor Author

deer commented Jan 22, 2024

Sorry @hashrock, that was possibly the worst PR I've ever created. The feature wasn't at all working 😭

But on the positive side, it's now working and there are really good tests. Here's what's changed:

  1. Add a bunch of line breaks in the markdown to make it super obvious that the page is moving around (or not). This was the primary problem.
  2. Stop sanitizing certain attributes and classes necessary for the feature to actually work.
  3. Include the extra necessary styles.
  4. Copy the unit test from the source as the starting point and then modify it where necessary, instead of generating html from the markdown and assuming it's correct.
  5. Add a lengthy server test to ensure styles and other stuff are working correctly.

@deer deer mentioned this pull request Jan 29, 2024
@deer deer marked this pull request as draft January 29, 2024 11:41
@deer
Copy link
Contributor Author

deer commented Jan 29, 2024

Waiting on #99 so that the server test is cleaner and more useful.

@deer deer marked this pull request as ready for review January 29, 2024 12:36
@deer
Copy link
Contributor Author

deer commented Jan 29, 2024

Hi @crowlKats, if you could jump in here again, that'd be appreciated.

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crowlKats crowlKats merged commit 1c3f599 into denoland:main Jan 29, 2024
1 check passed
@deer deer deleted the footnotes branch January 29, 2024 13:40
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.

Add support for footnotes
3 participants