Eric Knibbe avatar Eric Knibbe committed 8464e22 Draft

account for empty comments, which don't consume following blocks

Comments (0)

Files changed (1)

bbedit/reStructuredText.plist

 <!--
 	BBEdit codeless language module for reStructuredText files.
 	Eric Knibbe
-	Version 1.2
+	Version 1.3
 
 	Parses each section title as a function name so they show up in the function
-	popup. (Can't indent them according to heading level nor nest fold markers in
-	the sidebar due to limitations with CLMs). Will also highlight directives,
+	popup. (Can't indent them according to heading level, nor nest fold markers in
+	the sidebar due to limitations with CLMs.) Will also highlight directives,
 	directive options, roles, field names, substitutions, references, targets,
 	interpreted text, and comment blocks.
 
 		<key>Comment Pattern</key>
 		<string><![CDATA[(?x:
 			(\A | ^[ \t]*\r) (
-				(?P<pad>[ \t]*)\.\. (
-					[ \t]+ (
-						\b(?!(py|c|cpp|js|rst|ada|cl|coffee|dqn|erl|go|http|jinja|ls|mat|
-									php|op|rb|scl):)[a-z0-9][-+.\w]*
-						(?(?=\ ?:)
-							\ ?:((:(?=[^\s]) | [^:])[^\r]* | $)
-							| ([^-+.\w][^\r]* | $)
-						) | [^\w[|\s][^\r]*
-					) | [ \t]*
-				) (
-					\r (
-						[ \t]*
-						| (?P=pad)[ \t]+[^\s][^\r]*
-					)
-				)*(\r(?=(?P=pad)\.\.|[ \t]*$) | \Z)
-			)+
+				[ \t]*\.\.[ \t]*\r[ \t]*$ | (
+					(?P<pad>[ \t]*)\.\. (
+						[ \t]+ (
+							\b(?!(py|c|cpp|js|rst|ada|cl|coffee|dqn|erl|go|http|jinja|ls|mat|
+										php|op|rb|scl):)[a-z0-9][-+.\w]*
+							(?(?=\ ?:)
+								\ ?:((:(?=[^\s]) | [^:])[^\r]* | $)
+								| ([^-+.\w][^\r]* | $)
+							) | [^\w[|\s][^\r]*
+						) | [ \t]*
+					) (
+						\r (
+							[ \t]*
+							| (?P=pad)[ \t]+[^\s][^\r]*
+						)
+					)*(\r(?=(?P=pad)\.\.|[ \t]*$) | \Z)
+				)+
+			)
 		)]]></string>
 		<key>Function Pattern</key>
 		<string><![CDATA[(?x:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.