Markdown grammar improvements.

This commit is contained in:
Martín Lucas Golini
2025-12-13 17:21:25 -03:00
parent bd86dd50d5
commit 354c958d6d
4 changed files with 147 additions and 17 deletions

View File

@@ -42,6 +42,7 @@ struct EE_API SyntaxPattern {
IsRootSelfInclude = 1 << 3,
IsRangedMatch = 1 << 5,
IsSourceInclude = 1 << 6,
IsAutomaticallyAdded = 1 << 7,
};
static SyntaxDefMap<SyntaxStyleType, std::string> SyntaxStyleTypeCache;
@@ -108,6 +109,8 @@ struct EE_API SyntaxPattern {
inline bool isRangedMatch() const { return flags & Flags::IsRangedMatch; }
inline bool isAutomaticallyAdded() const { return flags & Flags::IsAutomaticallyAdded; }
inline bool isSimpleRangedMatch() const {
return isRangedMatch() && !hasContentScope() && !hasSyntax();
}