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

Commit ab9a641

Browse files
authored
Merge pull request #2 from scpwiki/regex-no-extended
Remove extended modifiers
2 parents 7acd989 + e8feaf9 commit ab9a641

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+63
-63
lines changed

Text/Wiki/Parse/Default/Anchor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Text_Wiki_Parse_Anchor extends Text_Wiki_Parse {
4949
'(\[\[\#\s)' . # Two brackets, then hash
5050
'([-_A-Za-z0-9.%]+?)' . # Contents of anchor
5151
'(\]\])' . # Closing brackets
52-
'/ix';
52+
'/i';
5353

5454
/**
5555
*

Text/Wiki/Parse/Default/Bibcite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Text_Wiki_Parse_Bibcite extends Text_Wiki_Parse {
4848
'bibcite\s' . # Module name and whitespace
4949
'([a-z0-9]+)' . # Alphanumeric citation
5050
'\)\)' . # Closing parens
51-
'/ix';
51+
'/i';
5252

5353
function process(&$matches) {
5454
$label = $matches[1];

Text/Wiki/Parse/Default/Bibliography.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function parse() {
4141
'(.*?)' . # Contents
4242
'\[\[\/bibliography\]\]' . # End tag
4343
'[\s]*$' . # Allow whitespace until end of the line
44-
'/smx';
44+
'/sm';
4545
$this->wiki->source = preg_replace_callback($regex,
4646
array(&$this, 'process'), $this->wiki->source, 1);
4747
}

Text/Wiki/Parse/Default/Blockquote.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Text_Wiki_Parse_Blockquote extends Text_Wiki_Parse {
5555
'\n' . # Start at a newline
5656
'((\>).*?\n)' . # Match a >, then anything up until a newline
5757
'(?!(\>))' . # Assert that the newline is not followed by a >
58-
'/sx';
58+
'/s';
5959
# Sorry, what? A line of blockquote //cannot// be followed by another
6060
# line? Am I reading that correctly? Then why is the second > captured?
6161
# ANSWER: This module doesn't even use this regex. Nice one, Wikidot.
@@ -98,7 +98,7 @@ function process(&$matches)
9898
'(\>+?)' . # At least one >
9999
'\s' . # Require exactly one whitespace
100100
'(.*?\n)' . # Include anything else up until a newline
101-
'/msx',
101+
'/ms',
102102
$matches[1],
103103
$list,
104104
PREG_SET_ORDER

Text/Wiki/Parse/Default/Bold.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Text_Wiki_Parse_Bold extends Text_Wiki_Parse {
5757
"()" . # Nothing (captured, for some reason)
5858
"|[^'].*?)" . # OR any text that doesn't start with a single quote
5959
"'''" . # Closing triple single-quotes
60-
"/x";
60+
"/";
6161

6262
/**
6363
*

Text/Wiki/Parse/Default/Button.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Text_Wiki_Parse_Button extends Text_Wiki_Parse {
3434
'([a-z0-9\-_]+)' . # Button name
3535
'(?:\s+(.+?))?' . # Optional button parameters
3636
'\]\]' . # Closing brackets
37-
'/isx';
37+
'/is';
3838

3939
function process(&$matches)
4040
{

Text/Wiki/Parse/Default/Clearfloat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Text_Wiki_Parse_Clearfloat extends Text_Wiki_Parse {
4848
'([~]{4,})' . # ~~~~
4949
'(>|<)?' . # Optional directional modifier
5050
'$' .
51-
'/mx';
51+
'/m';
5252

5353
/**
5454
*

Text/Wiki/Parse/Default/Collapsible.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Text_Wiki_Parse_Collapsible extends Text_Wiki_Parse {
5151
'\]\]' .
5252
'(.*?)' . # Contents of collapsible - no nesting
5353
'\[\[\/collapsible\]\]\s*' .
54-
'/msix';
54+
'/msi';
5555

5656
/**
5757
*

Text/Wiki/Parse/Default/Colortext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class Text_Wiki_Parse_Colortext extends Text_Wiki_Parse {
4848
*/
4949

5050
public $regex = '/' .
51-
'\#\#' .
51+
'##' .
5252
'(.+?)' . # Colou?r
5353
'\|' . # Pipe to split colour and text
5454
'(.+?)' . # Text
55-
'\#\#' .
56-
'/x';
55+
'##' .
56+
'/';
5757

5858
/**
5959
*

Text/Wiki/Parse/Default/Comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Text_Wiki_Parse_Comment extends Text_Wiki_Parse {
4646
'\[!\-\-' . # [!--
4747
'(.*?)' . # Any text - no nesting
4848
'\-\-\]' . # --]
49-
'/six';
49+
'/si';
5050

5151
/**
5252
*

0 commit comments

Comments
 (0)