We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c82a669 + 5b9bff4 commit af7efa5Copy full SHA for af7efa5
bin/lesson_check.py
@@ -57,7 +57,16 @@
57
P_INTERNAL_INCLUDE_LINK = re.compile(r'^{% include ([^ ]*) %}$')
58
59
# Pattern to match image-only and link-only lines
60
-P_LINK_IMAGE_LINE = re.compile("^[> ]*(!?)\[([^]]+)\][([]([^)]+)[])][ ]*$")
+P_LINK_IMAGE_LINE = re.compile(r'''
61
+ [> #]* # any number of '>', '#', and spaces
62
+ !? # ! or nothing
63
+ \[[^]]+\] # [any text]
64
+ [([] # ( or [
65
+ [^])]+ # 1+ characters that are neither ] nor )
66
+ [])] # ] or )
67
+ (?:{:[^}]+})? # {:any text} or nothing
68
+ [ ]* # any number of spaces
69
+ \\?$ # \ or nothing + end of line''', re.VERBOSE)
70
71
# What kinds of blockquotes are allowed?
72
KNOWN_BLOCKQUOTES = {
0 commit comments