mirror of
https://github.com/apple/pkl.git
synced 2026-01-18 17:37:07 +01:00
refactor: Simplify regex pattern for code block matching (#592)
This commit is contained in:
@@ -41,7 +41,7 @@ class DocSnippetTestsEngine : HierarchicalTestEngine<DocSnippetTestsEngine.Execu
|
||||
companion object {
|
||||
val headingRegex = Regex("""(?u)^\s*(=++)\s*(.+)""")
|
||||
val collapsibleBlockRegex = Regex("""(?u)^\s*\[%collapsible""")
|
||||
val codeBlockRegex = Regex("""(?u)^\s*\[source(?:%(tested|parsed)(%error)?)?(?:,(?:\{)?([a-zA-Z-_]+)}?)?""")
|
||||
val codeBlockRegex = Regex("""(?u)^\s*\[source(?:%(tested|parsed)(%error)?)?(?:,\{?([a-zA-Z-_]+)}?)?""")
|
||||
val codeBlockNameRegex = Regex("""(?u)^\s*\.(.+)""")
|
||||
val codeBlockDelimiterRegex = Regex("""(?u)^\s*----""")
|
||||
val graphicsRegex = Regex("\\[small]#.+#")
|
||||
|
||||
Reference in New Issue
Block a user