[Solar-svn] Revision 3239
pmjones at solarphp.com
pmjones at solarphp.com
Fri Jul 25 10:36:28 CDT 2008
Solar_Markdown: [FIX] Fix error where literal-text numbers are mis-interpreted as encoded Markdown numbers. Thanks, Jeff Moore, for the report that led to this fix.
Modified: trunk/Solar/Markdown.php
===================================================================
--- trunk/Solar/Markdown.php 2008-07-25 15:35:06 UTC (rev 3238)
+++ trunk/Solar/Markdown.php 2008-07-25 15:36:27 UTC (rev 3239)
@@ -118,15 +118,24 @@
/**
*
- * Delimiter for encoded Markdown characters.
+ * Left-delimiter for encoded Markdown characters.
*
* @var string
*
*/
- protected $_char_delim = "\x1B";
+ protected $_char_ldelim = "\x02";
/**
*
+ * Right-delimiter for encoded Markdown characters.
+ *
+ * @var string
+ *
+ */
+ protected $_char_rdelim = "\x03";
+
+ /**
+ *
* Array of HTML blocks represented by delimited token numbers.
*
* Format is token => html.
@@ -280,7 +289,7 @@
$plugin = Solar::factory($class);
}
- // save the plygin
+ // save the plugin
$this->_plugin[$class] = $plugin;
$plugin->setMarkdown($this);
@@ -313,7 +322,7 @@
$k = strlen($this->_chars);
for ($i = 0; $i < $k; ++ $i) {
$char = $this->_chars[$i];
- $delim = $this->_char_delim . $i. $this->_char_delim;
+ $delim = $this->_char_ldelim . $i. $this->_char_rdelim;
$this->_esc[$char] = $delim;
$this->_bs_esc["\\$char"] = $delim;
@@ -322,7 +331,7 @@
/**
*
- * Returns an internal Markdow plugin object for direct manipulation
+ * Returns an internal Markdown plugin object for direct manipulation
* and inspection.
*
* @param string $class The plugin class name.
More information about the Solar-svn
mailing list