This repository was archived by the owner on Sep 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class Text_Wiki_Parse_Comment extends Text_Wiki_Parse {
45
45
'(\n)? ' . # Optional newline?
46
46
'\[!\-\- ' . # [!--
47
47
'(.*?) ' . # Any text - no nesting
48
- '\-\-\] ' / # --]
48
+ '\-\-\] ' . # --]
49
49
'/six ' ;
50
50
51
51
/**
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ class Text_Wiki_Parse_Iftags extends Text_Wiki_Parse {
27
27
28
28
29
29
public $ regex = '/ ' .
30
- '\[\[iftags(\s[^\]]*)?\]\] ' . # Opening iftags tag including parameters
30
+ '\[\[iftags(\s[^\]]*)?\]\] ' . # Opening iftags tag including parameters
31
31
'( ' .
32
- '(?:(?R)|.) ' . # Contents of the page, including other iftags
33
- '*?) ' . # Non-greedy match to claim next closing tag
34
- '\[\[/iftags\]\] ' . # Closing tag
32
+ '(?:(?R)|.) ' . # Contents of the page, including other iftags
33
+ '*?) ' . # Non-greedy match to claim next closing tag
34
+ '\[\[\ /iftags\]\] ' . # Closing tag
35
35
'/msix ' ;
36
36
# Note regarding non-greedy match: I'm not sure how a recursive regex match
37
37
# works entirely, so I've written that it claims the next closing tag.
Original file line number Diff line number Diff line change @@ -51,20 +51,18 @@ class Text_Wiki_Parse_List extends Text_Wiki_Parse {
51
51
*
52
52
*/
53
53
54
- public $ regex = '/ ' .
55
- '^ ' .
54
+ public $ regex = '/^ ' .
56
55
'( ' .
57
- '(\*|#)\s ' . # Asterisk or hash (bullet or number)
58
- '.*?\n ' . # Text of list item
56
+ '(\*|#) .*\n ' .
59
57
') ' .
60
58
'(?! ' .
61
- '\2\s ' . # The asterisk or hash as matched before
62
- '|(?: ' . # OR:
63
- '\s+((?:\*?|#)\s ' . # Some whitespace then asterisk or hash
64
- '|\n) ' . # OR a newline
59
+ '\2 | ' .
60
+ '(?: ' .
61
+ '{1,}( ' .
62
+ '(?:\*|#)|\n ' .
63
+ ') ' .
65
64
') ' .
66
- ') ' .
67
- '/smx ' ;
65
+ ')/Usm ' ;
68
66
69
67
/**
70
68
*
You can’t perform that action at this time.
0 commit comments