From d1c16bef1ad059ab81f853cf3ebd6095880a2a2a Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Thu, 4 Oct 2012 15:47:05 -0400 Subject: [PATCH] Clarified what variables in the parser class are meant to be configurable and which are not. --- markdown.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/markdown.php b/markdown.php index 4c5aaee..64e3cf2 100644 --- a/markdown.php +++ b/markdown.php @@ -190,17 +190,7 @@ if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { class Markdown_Parser { - # Regex to match balanced [brackets]. - # Needed to insert a maximum bracked depth while converting to PHP. - var $nested_brackets_depth = 6; - var $nested_brackets_re; - - var $nested_url_parenthesis_depth = 4; - var $nested_url_parenthesis_re; - - # Table of hash values for escaped characters: - var $escape_chars = '\`*_{}[]()>#+-.!'; - var $escape_chars_re; + ### Configuration Variables ### # Change to ">" for HTML output. var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; @@ -215,6 +205,21 @@ class Markdown_Parser { var $predef_titles = array(); + ### Parser Implementation ### + + # Regex to match balanced [brackets]. + # Needed to insert a maximum bracked depth while converting to PHP. + var $nested_brackets_depth = 6; + var $nested_brackets_re; + + var $nested_url_parenthesis_depth = 4; + var $nested_url_parenthesis_re; + + # Table of hash values for escaped characters: + var $escape_chars = '\`*_{}[]()>#+-.!'; + var $escape_chars_re; + + function Markdown_Parser() { # # Constructor function. Initialize appropriate member variables.