-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description of the Issue
I'm trying to implement in UDL code folding for what I'll call semi-structured text documents, like markdown, and it's becoming apparent to me that this is impossible in User Defined Language.
For instance, what I would like is that in a markdown document with headers
# This
## And
## That
### Also
### Like
### These
## Oho
### Aha!
folding on # This would fold the entire document (as there is no other single #), ## And would fold up to ## That, ## That would fold up to ## Oho, etc. Basically, every header would also fold the text in its subheaders, right up to the next header of equal precedence.
The problem as it now stands is you cannot specify that # should open a fold section yet also close the previous one. Specifying, say, ## as both open and close just makes any ## fold the entire rest of the document. We need clopen operators.
Now, while code folding in markdown would be nice-- and could perhaps be hardcoded-- I would also like code folding for my bespoke format ("Numbered Sections"?), which is like
1. Introduction
1.1. Preamble
1.2. Disclaimer
2. The Beginning
So I would quite like a more expressive UDL system where I can express this.