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

fails to ignore pounds in markdown code fences #91

Open
masukomi opened this issue Aug 29, 2023 · 2 comments
Open

fails to ignore pounds in markdown code fences #91

masukomi opened this issue Aug 29, 2023 · 2 comments

Comments

@masukomi
Copy link

if it sees a # in a codefence it assumes that it's a heading.

CleanShot 2023-08-29 at 12 22 22@2x

(screenshot instead of text because escaping codefences in a codefence is a dark art... or something)

@snosov1
Copy link
Owner

snosov1 commented Aug 31, 2023

Yup, sounds lilke an issue.

In org, I believe, one should use '* to escape star signs within codeblocks.

In markdown, I don't think they have escape symbols per se. But I believe, you can workaround it by either using tabs/4 spaces to distinguish a code block (that way you can't specify the language, though).

This should be a normal header

# This shouldn't be a header

Or you could add a space before the # within a three-backticks section (toc-org, supposedly, will ignore it), like so

 # reboot

(Not sure if you can see the source of this comment)

@snosov1
Copy link
Owner

snosov1 commented Aug 31, 2023

The cleanest way to fix it without relying on some kind of escape mechanics is to pre-process the source to eliminate all codeblocks, but, for now, I'm not 100% sure I should do this, since both markups seem to have at least some sort of escape mechanics

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

No branches or pull requests

2 participants