-
Hi there. To preface this, I've been reading a couple of the discussions on here and I think the advice that's been given thus far has mostly been not to write an extension and use generic directives instead. However, I thought it would be a fun challenge to try and write one, regardless. I'm doing this mostly as a programming exercise and, unfortunately, I seem to have hit something of a stumbling block. The extension I've been working on recently provides the following syntax: As my extension hooks into Let's say we have
If, for instance, I have
This is unintended behavior. I know I could probably just not allow markdown inside the label, but I was just wondering if there was any way to disable a particular tokenizer inside another tokenizer? I'm sorry if the terminology is confusing. I'm not sure if I'm using terms correctly as I'm still relatively unfamiliar. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
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? Why not use directives? Why disallow nesting? Links are similar, but they are Alternatively, you could do this when compiling to html? Set a toggle when you enter your |
Beta Was this translation helpful? Give feedback.
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.