|
|
What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
# harmonise line-endings
Replace !(\n\r)|(\r\n)|(\r)!\n!
# escape rogue HTML
Replace !<!<!
Replace !>!>!
# "six-ticks" - override pattern recognition
Replace !''''''!<b>!
# "hands-off" block
Lock !\[\n((.|\n)*?)\n\]!<pre>&1 !
# tabs, emphasis and rulers
Replace ! !\t!
Replace !\n\s*\n!\n<p/>\n!
Replace !'{5}(.+?)'{5}!<i>$1!
Replace !'{3}(.+?)'{3}!<b>$1!
Replace !'{2}(.+?)'{2}!<i>$1!
Replace !(^|\n)-{4,}!\n<hr/>!
# ordered/unordered list
FilterReplace wiki.ListRow !(^\t+(\*|[1234567890]+)\.?\s*(.+)(\n|\z))+!\n&~0!
# monospace
Replace !(^ (.+))(\n (.+))*!<pre>$0!
Replace !<pre> !!
Replace !\n !\n!
# def list
Replace !(((?:^|\n)\t+)(?:\s*)(.*)(?:\s*):(?:\s*)(.*))+!<dl>\n$0\n!
Replace !((?:^|\n)\t+)(?:\s*)(.*)(?:\s*):(?:\s*)(.*)!$1<dt>$2 $3!
# embedded URLs
Lock !(?i)(http|https|ftp|file):([^\s\<\>\[\]\"'\(\)\?])*[^\s\<\>\[\]\"'\(\)\?\,\.](\.gif|\.jp[eg]{1,2}|\.png)([\?][^\s\<\>\[\]\"'\(\)\?]*[^\s\<\>\[\]\"'\(\)\?\,\.])?(?-i)! !
Lock !(?i)(http|https|ftp|file|mailto)(?-i):([^\s\<\>\[\]\"'\(\)\?])*[^\s\<\>\[\]\"'\(\)\?\,\.]([\?][^\s\<\>\[\]\"'\(\)\?]*[^\s\<\>\[\]\"'\(\)\?\,\.])?!&0!
Lock !(?:(?i)mailto:(?-i))((\p{Alnum}+(\.|\_|\-)?)*\p{Alnum}@(((\p{Alnum}+(\.|\_|\-)?)*\p{Alpha})|((([0-1]?\d{1,2}\.)|(2[0-4]\d\.)|(25[0-5]\.)){3}(([0-1]?\d{1,2}\.)|(2[0-4]\d\.)|(25[0-5])))))!<a href='&0'>&1!
# embedded ISBN
FilterLock wiki.CompressISBN !(?:\[\s?)?(?:ISBN:?\s?)((?:\d[ -]?){9}(?:[\dXx]))(?:\s?\])?!<a href='http://www.amazon.com/exec/obidos/ASIN/&~1/efficacysolut-20'>ISBN &1!
# remote wiki link
FilterReplace wiki.RemoteWikiLink !(\p{Alpha}+):([^\s\n\Z}]+)!&~1{&1}{&2}!
Lock !\nremote\{(.*)\}\{(.*)\}\{(.*)\}!<a href='&1&3'>&2:&3!
Lock !\nunknown\{(.*)\}\{(.*)\}\{(.*)\}!&2:&3!
# internal page link
FilterReplace wiki.LocalWikiLink /(^|\p{Punct}|\p{Space})((\p{Lu}\p{Ll}+){2,})(\z|\n|\p{Punct}|\p{Space})/&1&~2&4/
Lock !\?\?\n(?:view|edit)\{(.*),(.*)\}\n!<a href='diff?&2'>changes!
Lock !\nview\{(.*),(.*)\}\n!<a href='view?&2'>&1!
Lock !\nedit\{(.*),(.*)\}\n!&1<a href='edit?&2'>?!
# a "hook" for extra user-defined processing without mucking up this file
Include wiki-extra.txt
# merge locked and unlocked regions so they can be placed in table cells
Join
# table (follows the Join, to allow "hands off" blocks in table cells
FilterLock wiki.TableRow !(?<=(^|\n))\|(([^<]||.*?||(.|\n)*? )*?\|[ \t]*)+(?=($|\n))!!
|