\n";
- foreach ($row_cells as $n => $cell)
+ foreach ($row_cells as $n => $cell) {
$text .= " | " . $this->runSpanGamut(trim($cell)) . " | \n";
+ }
$text .= "
\n";
}
$text .= "\n";
@@ -1411,8 +1468,6 @@ protected function _processDefListItems_callback_dd($matches) {
*/
protected function doFencedCodeBlocks($text) {
- $less_than_tab = $this->tab_width;
-
$text = preg_replace_callback('{
(?:\n|\A)
# 1: Opening marker
@@ -1465,9 +1520,10 @@ protected function _doFencedCodeBlocks_callback($matches) {
array($this, '_doFencedCodeBlocks_newlines'), $codeblock);
$classes = array();
- if ($classname != "") {
- if ($classname{0} == '.')
+ if ($classname !== "") {
+ if ($classname[0] === '.') {
$classname = substr($classname, 1);
+ }
$classes[] = $this->code_class_prefix . $classname;
}
$attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs, null, $classes);
@@ -1608,65 +1664,95 @@ protected function appendFootnotes($text) {
$text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}',
array($this, '_appendFootnotes_callback'), $text);
- if (!empty($this->footnotes_ordered)) {
- $text .= "\n\n";
- $text .= "";
+ $text .= "