summaryrefslogtreecommitdiff
path: root/includes/pear/Text/Wiki/Parse/Creole/Newline.php
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2018-07-31 23:49:37 -0400
committerspiderr <spiderr@bitweaver.org>2018-07-31 23:49:37 -0400
commita2f342591712f07923ea53740778724fbe7e2b32 (patch)
tree798bf395b510f45b49226aa816ccd191d48dbc47 /includes/pear/Text/Wiki/Parse/Creole/Newline.php
parent4a945905298ba6173c2f53dfac5fe5fcffa3fb84 (diff)
downloadutil-a2f342591712f07923ea53740778724fbe7e2b32.tar.gz
util-a2f342591712f07923ea53740778724fbe7e2b32.tar.bz2
util-a2f342591712f07923ea53740778724fbe7e2b32.zip
major reorg and move everything to includes/ and Deny all in .htaccess
Diffstat (limited to 'includes/pear/Text/Wiki/Parse/Creole/Newline.php')
-rw-r--r--includes/pear/Text/Wiki/Parse/Creole/Newline.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/includes/pear/Text/Wiki/Parse/Creole/Newline.php b/includes/pear/Text/Wiki/Parse/Creole/Newline.php
new file mode 100644
index 0000000..92554ed
--- /dev/null
+++ b/includes/pear/Text/Wiki/Parse/Creole/Newline.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ *
+ * Parses for implied line breaks indicated by newlines.
+ * Newlines are not considered if followed by another newline
+ * or by one of these chars: * | - # = {
+ *
+ * @category Text
+ *
+ * @package Text_Wiki
+ *
+ * @author Michele Tomaiuolo <tomamic@yahoo.it>
+ *
+ * @license LGPL
+ *
+ * @version $Id: Newline.php 240560 2007-08-01 11:00:11Z mic $
+ *
+ */
+
+class Text_Wiki_Parse_Newline extends Text_Wiki_Parse {
+
+
+ /**
+ *
+ * The regular expression used to parse the source text and find
+ * matches conforming to this rule. Used by the parse() method.
+ *
+ * @access public
+ *
+ * @var string
+ *
+ * @see parse()
+ *
+ */
+
+ //var $regex = '/(?<!\n)\n(?![\n\#\=\|\-\>\:]|\*[^\*\#]|\*+ )/m';
+ var $regex = '/(?<!\n)\n(?!\n|\#|\*|\=|\||\>|\:|\;|\!|\-\D)/m';
+
+
+ /**
+ *
+ * Generates a replacement token for the matched text.
+ *
+ * @access public
+ *
+ * @param array &$matches The array of matches from parse().
+ *
+ * @return string A delimited token to be used as a placeholder in
+ * the source text.
+ *
+ */
+
+ function process(&$matches)
+ {
+ return ' '; // $this->wiki->addToken($this->rule);
+ }
+}
+
+?> \ No newline at end of file