From 2b6880a20aa18e77bc71d67d48c8920a0ee29e1d Mon Sep 17 00:00:00 2001 From: Anthony Kolber Date: Wed, 6 Jan 2010 12:20:39 +1100 Subject: [PATCH] Removed content parser --- app/parsers/content-parser.inc.php | 69 ------------------------------ 1 file changed, 69 deletions(-) delete mode 100644 app/parsers/content-parser.inc.php diff --git a/app/parsers/content-parser.inc.php b/app/parsers/content-parser.inc.php deleted file mode 100644 index c478f3e4..00000000 --- a/app/parsers/content-parser.inc.php +++ /dev/null @@ -1,69 +0,0 @@ -)\bhttps?:\/\/([-A-Za-z0-9+&@#\/%\?\=~_\(\)|!:,.;]*[-A-Za-z0-9+&@#\/%=~_|])/', - # automatically link email addresses - '/(?)\b([-A-Za-z0-9+&#\/%\?\=~_\(\)|!,.]+)@([-A-Za-z0-9_.#&;]+)/', - # convert lists - '/\n?-(.+?)(?=\n)/', - '/(
  • .*<\/li>)/', - # replace doubled lis - '/<\/li><\/li>/', - # replace headings h1. h2. etc - '/h([0-5])\.\s?(.*)/', - # wrap multi-line text in paragraphs - '/([^\n]+?)(?=\n)/', - '/

    (.+):(.+)<\/p>/', - '/: (.+)(?=\n

    )/', - # replace any keys that got wrapped in ps - '/(

    )([a-z0-9_-]+):(<\/p>)/', - # replace any headings that got wrapped in ps - '/

    (.*<\/h[0-5]>)<\/p>/' - ); - $replacements = array( - # replace inline colons - '$1\\x01', - ':', - ':', - # replace inline dashes - '\\x02', - '-', - '-', - # automatically link http:// websites - 'http://$1', - # automatically link email addresses - '$1@$2', - # convert lists - '

  • $1
  • ', - '', - # replace doubled lis - '', - # replace headings h1. h2. etc - '$2', - # wrap multi-line text in paragraphs - '

    $1

    ', - '$1:$2', - ':

    $1

    ', - # replace any keys that got wrapped in ps - '$2:', - '$1' - ); - $parsed_text = preg_replace($patterns, $replacements, $text); - return $parsed_text; - } - -} - -?> \ No newline at end of file