Skip to content
This repository was archived by the owner on Sep 24, 2022. It is now read-only.

Commit b7d1984

Browse files
committed
More fixes
1 parent 1d97291 commit b7d1984

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

Text/Wiki/Parse/Default/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Text_Wiki_Parse_Comment extends Text_Wiki_Parse {
4545
'(\n)?' . # Optional newline?
4646
'\[!\-\-' . # [!--
4747
'(.*?)' . # Any text - no nesting
48-
'\-\-\]' / # --]
48+
'\-\-\]' . # --]
4949
'/six';
5050

5151
/**

Text/Wiki/Parse/Default/Iftags.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class Text_Wiki_Parse_Iftags extends Text_Wiki_Parse {
2727

2828

2929
public $regex = '/' .
30-
'\[\[iftags(\s[^\]]*)?\]\]' . # Opening iftags tag including parameters
30+
'\[\[iftags(\s[^\]]*)?\]\]' . # Opening iftags tag including parameters
3131
'(' .
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
3535
'/msix';
3636
# Note regarding non-greedy match: I'm not sure how a recursive regex match
3737
# works entirely, so I've written that it claims the next closing tag.

Text/Wiki/Parse/Default/List.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,18 @@ class Text_Wiki_Parse_List extends Text_Wiki_Parse {
5151
*
5252
*/
5353

54-
public $regex = '/' .
55-
'^' .
54+
public $regex = '/^' .
5655
'(' .
57-
'(\*|#)\s' . # Asterisk or hash (bullet or number)
58-
'.*?\n' . # Text of list item
56+
'(\*|#) .*\n' .
5957
')' .
6058
'(?!' .
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+
')' .
6564
')' .
66-
')' .
67-
'/smx';
65+
')/Usm';
6866

6967
/**
7068
*

0 commit comments

Comments
 (0)