File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -200,26 +200,26 @@ def hide_non_rst_blocks(lines, hidden_block_cb=None):
200200 return output
201201
202202
203- _is_directive = re .compile (rf"\.\. { rst .ALL_DIRECTIVES } ::" ).match
204- _is_footnote = re .compile (r"\.\. \[[0-9]+\] " ).match
205- _is_citation = re .compile (r"\.\. \[[^\]]+\] " ).match
206- _is_target = re .compile (r"\.\. _.*[^_]: " ).match
207- _is_substitution = re .compile (r"\.\. \|[^\|]*\| " ).match
203+ _contains_directive = re .compile (rf"\.\. { rst .ALL_DIRECTIVES } ::" ).match
204+ _contains_footnote = re .compile (r"\.\. \[[0-9]+\] " ).match
205+ _contains_citation = re .compile (r"\.\. \[[^\]]+\] " ).match
206+ _contains_target = re .compile (r"\.\. _.*[^_]: " ).match
207+ _contains_substitution = re .compile (r"\.\. \|[^\|]*\| " ).match
208208
209209
210210@lru_cache ()
211211def type_of_explicit_markup (line ):
212212 """Tell apart various explicit markup blocks."""
213213 line = line .lstrip ()
214- if _is_directive (line ):
214+ if _contains_directive (line ):
215215 return "directive"
216- if _is_footnote (line ):
216+ if _contains_footnote (line ):
217217 return "footnote"
218- if _is_citation (line ):
218+ if _contains_citation (line ):
219219 return "citation"
220- if _is_target (line ):
220+ if _contains_target (line ):
221221 return "target"
222- if _is_substitution (line ):
222+ if _contains_substitution (line ):
223223 return "substitution_definition"
224224 return "comment"
225225
You can’t perform that action at this time.
0 commit comments