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

Handle <br /> nodes in preformattedCode #250

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

AriTheElk
Copy link
Contributor

Fixes #145

In preformatted code blocks highlighted by hljs, there are <br /> elements used to break up newlines. These weren't getting handled by extractStructuredText, so I added a handler for it.

When working on this, I noticed another issue: it appears that comments are getting stripped from hljs code blocks 😱 if you try the clipper out on the medium article linked in #145, you can see that aside from newlines, comments are missing. This seems a little more tricky, because by the time the content makes it's way to the preformattedCode rule, it's already missing comments.

I can open up a separate ticket for that if it would be helpful :)

@kepano kepano merged commit 0a7f161 into obsidianmd:main Dec 11, 2024
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.

BUG: Indentation in code blocks is sometimes missing
2 participants