Skip to content

How to Prevent Nesting #58

Answered by wooorm
Malkuthe asked this question in Q&A
May 14, 2021 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

oh no, sorry, I missed this! How did you fare?

Ok, as I understand it, you have some text construct, which allows more text inside of it, but you don‘t want these constructs nested?
Hmm, complex.

Why not use directives?

Why disallow nesting?

Links are similar, but they are [ and then ](whatever). You could similarly parse starts and ends, but your end is quite a common marker.

Alternatively, you could do this when compiling to html? Set a toggle when you enter your customConstruct and turn that off when exiting. When you’re entering but already in one, do something different.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Malkuthe
Comment options

@wooorm
Comment options

@Malkuthe
Comment options

@wooorm
Comment options

@Malkuthe
Comment options

Answer selected by Malkuthe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants