LazyWebLinks
<< If Group | Cookbook-V1 | Random Incl >>
Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
Goal
Make it easier for page authors to write links to external web pages.
Solution
Add the lines
$LinkPatterns[310]["\\b(www\\.$UrlPathPattern)"] = "<a class='urllink' href='http://$0'>$0</a>";
to a local customization file. This will cause PmWiki to recognise text starting with www.
as a valid link, after it has processed the standard URL link syntax.
People often write www.pmwiki.org
(for example) -- with this recipe, it 'just works'.
Contributors
- jr, 16-Jun-2004
pmwiki-2.4.1 -- Last modified by {{jr}}