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: Reorder Unified.js plugins to fix #1132 #1139

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

RunTheBot
Copy link
Contributor

Fixes #1132

Before:
image

After:
image

@RunTheBot RunTheBot marked this pull request as draft May 16, 2024 00:24
@RunTheBot RunTheBot marked this pull request as ready for review May 16, 2024 00:35
@RunTheBot RunTheBot changed the title Reorder Unified.js to fix #1132 Reorder Unified.js plugins to fix #1132 May 16, 2024
@RunTheBot RunTheBot changed the title Reorder Unified.js plugins to fix #1132 fix: Reorder Unified.js plugins to fix #1132 May 16, 2024
Copy link
Owner

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

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

can you ensure that

  • latex in headings still work (and anchors/toc to these also still work)
  • this doesn't break syntax highlighting

@RunTheBot
Copy link
Contributor Author

Pretty sure toc was broken before 😅.

By syntax highlighting do you mean in code blocks?

@jackyzha0
Copy link
Owner

yeah code blocks that have latex as the language should still work

@RunTheBot
Copy link
Contributor Author

image
Renders to:
image

TOC is still broken:
before:
image
After:
image

quartz.config.ts Outdated Show resolved Hide resolved
@RunTheBot
Copy link
Contributor Author

The problem with the TOC is that it is generated by unifiedjs plugin but it is not mdast. When it is made:

  1. Only the text is gets forwarded to the TOC generator and not the whole ast node.
  2. The TOC element does not support ast

@RunTheBot
Copy link
Contributor Author

I have crated a new issue to track the bug with TOC #1143

@RunTheBot RunTheBot requested a review from jackyzha0 May 16, 2024 21:19
@jackyzha0 jackyzha0 merged commit 94fbf5b into jackyzha0:v4 May 29, 2024
4 checks passed
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.

MathJax rendering as code block in callout title
2 participants