array_html_preg_replace (line 815)
Do some regular expression matches, locked correctly to single HTML elements. This is necessary to make sure nesting is handled correctly, which regular expressions cannot do on their own.
string
array_html_preg_replace
(string $element, array $array, string $semihtml)
-
string
$element: The element name to replace over
-
array
$array: A list of pairs: Pattern, Replacement
-
string
$semihtml: Haystack
comcode_preg_replace (line 744)
Do a regular expression match, locked correctly to single Comcode elements. This is necessary to make sure nesting is handled correctly, which regular expressions cannot do on their own.
This is a good test case: exit(comcode_preg_replace('test','#\[test\](.*)\[/test\]#','>${1}<','[test]x[test a]y[/test]z[/test]'));
string
comcode_preg_replace
(string $element, string $pattern, mixed $replacement, string $semihtml)
-
string
$element: The element name to replace over
-
string
$pattern: Pattern
-
mixed
$replacement: Replacement (string or single element array specifying a function name)
-
string
$semihtml: Haystack
comcode_strip_html_tags (line 728)
preg_replace callback to strip HTML tags from inside a Comcode tag, except formatting ones that we'll convert to white-space.
string
comcode_strip_html_tags
(array $matches)
init__comcode_from_html (line 24)
Standard code module initialisation function.
void
init__comcode_from_html
()
semihtml_to_comcode (line 218)
Convert Semi-HTML into comcode. Cleanup where possible
LONG_TEXT
semihtml_to_comcode
(LONG_TEXT $semihtml)
-
LONG_TEXT
$semihtml: The Semi-HTML to converted
semihtml_to_comcode_wrap (line 205)
Convert Semi-HTML into comcode. Cleanup where possible. preg_replace_callback callback
string
semihtml_to_comcode_wrap
(array $matches)
-
array
$matches: Array of matches
_a_tag_link_fixup (line 67)
Used by semihtml_to_comcode to fix <a> tag links. preg_replace_callback callback
string
_a_tag_link_fixup
(array $matches)
-
array
$matches: Array of matches
_cdata_protect (line 110)
Apply temporary adhoc-escaping to a CDATA area (we'll reverse convert later). preg_replace_callback callback
string
_cdata_protect
(array $matches)
-
array
$matches: Array of matches
_codetag_protect (line 128)
Apply temporary adhoc-escaping to a code tags (we'll reverse convert later). preg_replace_callback callback
string
_codetag_protect
(array $matches)
-
array
$matches: Array of matches
_codetag_unprotect (line 142)
Apply temporary adhoc-escaping to a code tags (we'll reverse convert later). preg_replace_callback callback
string
_codetag_unprotect
(array $matches)
-
array
$matches: Array of matches
_css_color_fixup (line 81)
Used by semihtml_to_comcode to fix CSS colours aways from RGB notation. preg_replace_callback callback
string
_css_color_fixup
(array $matches)
-
array
$matches: Array of matches
_css_quot_fixup (line 99)
Used by semihtml_to_comcode to make it so inline CSS with quotes uses single quotes. preg_replace_callback callback
string
_css_quot_fixup
(array $matches)
-
array
$matches: Array of matches
_img_tag_fixup (line 35)
Used by semihtml_to_comcode to turn <img> to \[img\]. preg_replace_callback callback
string
_img_tag_fixup
(array $matches)
-
array
$matches: Array of matches
_reorder_css_properties (line 184)
Reorder style properties alphabetically, so our regexp's match better. preg_replace_callback callback
string
_reorder_css_properties
(array $matches)
-
array
$matches: Array of matches
_reorder_xhtml_attributes (line 156)
Reorder XHTML attributes alphabetically, so our regexp's match better. preg_replace_callback callback
string
_reorder_xhtml_attributes
(array $matches)
-
array
$matches: Array of matches