Mercurial > hgrepos > hgweb.cgi > s4
diff s4-funcs.sh @ 451:8965bdad3172
Add convenient link pattern [[#ArticleId]] for direct link to articles.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 14 Aug 2017 12:32:36 +0859 |
parents | 9724472a3cd2 |
children | c00857f0e9d2 |
line wrap: on
line diff
--- a/s4-funcs.sh Mon Aug 14 09:45:35 2017 +0859 +++ b/s4-funcs.sh Mon Aug 14 12:32:36 2017 +0859 @@ -466,7 +466,8 @@ # {{{URL}} } - <iframe src="URL"></iframe> # {{{URL|height}} - <iframe src="URL" height="height"></iframe> _hrefptn="[-A-Za-z0-9,.:;/~_%#&+?=@!]*" - sed -e "s|\[\[\($_hrefptn\)\|\([^]]*\)\]\]|<a href=\"\1\">\2</a>|g" \ + sed -e "s|\[\[\#\([0-9][0-9]*\)\]\]|<a href=\"?aid\1\">#\1</a>|g" \ + -e "s|\[\[\($_hrefptn\)\|\([^]]*\)\]\]|<a href=\"\1\">\2</a>|g" \ -e "s|\[\[\($_hrefptn\)\]\]|<a href=\"\1\">\1</a>|" \ -e "s|{{{\($_hrefptn\)\|\(.*\)}}}|<iframe src=\"\1\" height=\"\2\"></iframe>|g" \ -e "s|{{{\($_hrefptn\)}}}|<iframe src=\"\1\"></iframe>|g" \