* Markdown : remove http:// mandatory in links : can be relative !
* Markdown : add image support (http://daringfireball.net/projects/markdown/syntax ) git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1787 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -77,12 +77,15 @@ class markdown
|
||||
$search[] = "/\\n?\`((\\n|.)+)\`/Um";
|
||||
$replace[] = "<code>\\1</code>";
|
||||
|
||||
// LINKS
|
||||
// LINKS (can be relative)
|
||||
// images
|
||||
$search[] = "(!\[(.+)\]\((.+)\))";
|
||||
$replace[] = "<img src='\\2' alt='\\1'/>";
|
||||
// [Google Site](http://google.fr/ "With help bubble")
|
||||
$search[] = "(\[(.+)\]\((https?://.+) \"(.+)\"\))";
|
||||
$search[] = "(\[(.+)\]\((.+) \"(.+)\"\))";
|
||||
$replace[] = "<a href='\\2' title='\\3'>\\1</a>";
|
||||
// [Google Site](http://google.fr/)
|
||||
$search[] = "(\[(.+)\]\((http.+)\))"; $replace[] = "<a href='\\2'>\\1</a>";
|
||||
$search[] = "(\[(.+)\]\((.+)\))"; $replace[] = "<a href='\\2'>\\1</a>";
|
||||
// Automatics links :
|
||||
// <http://dominique.fournier38.fr>
|
||||
// <dominique@fournier38.fr>
|
||||
|
||||
Reference in New Issue
Block a user