-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
enhancementNew feature or requestNew feature or requestlintingLinting rules and validationLinting rules and validationpriority-4Low priority, when time permitsLow priority, when time permitsscriptsPowerShell, Bash, or Python scriptsPowerShell, Bash, or Python scripts
Description
Issue Description
The regex patterns for HTML comments and markdown formatting in Validate-MarkdownFrontmatter.ps1 have limitations and could be enhanced.
File: scripts/linting/Validate-MarkdownFrontmatter.ps1
Line: 179
Problem
Current patterns:
$htmlCommentPattern = '<!--.*?-->'
$markdownFormatPattern = '(\*\*|__)(.*?)\1|(\*|_)(.*?)\3'Limitations:
- HTML comment pattern doesn't handle multiline comments properly
- Markdown format pattern has backreference issues and doesn't cover all markdown syntax
Suggested Enhancement
$htmlCommentPattern = '(?s)<!--.*?-->'
$markdownFormatPattern = '(\*\*|__)([^*_]+?)\1|(\*|_)([^*_]+?)\3|\([^\`]+?\)'(?s)enables multiline matching for HTML comments- Non-greedy character classes prevent over-matching
- Added inline code pattern
Impact
- Severity: Low
- Enhancement to improve validation accuracy
- Not blocking current functionality
Source
Identified in PR #26 code review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlintingLinting rules and validationLinting rules and validationpriority-4Low priority, when time permitsLow priority, when time permitsscriptsPowerShell, Bash, or Python scriptsPowerShell, Bash, or Python scripts