Skip to content

Section Headers vs Comments #123

Answered by ttscoff
kotfu asked this question in Q&A
Jul 26, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I've begun work on a TextMate bundle for Bunch files,

That's awesome!

The request for advice: is it a feature or a bug that # [My Section] gets parsed as a section header? Or to ask it another way, should # [My Section] be parsed as a comment and #[My Section be parsed as a section header? If
feature, how would you suggest I distinguish that from a comment in the regular expressions of the grammer I'm writing? Look for open and closed brackets in the "comment" and if found, style it as a section header?

When a snippet is loaded without a fragment ID, the headers are treated as comments (i.e. ignored), so I guess it's kind of a feature. In the Sublime Text syntax definition I use this …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kotfu
Comment options

Answer selected by kotfu
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