s4

changeset 478:926f61977175

Add experimental search keyword link like hash-tags
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 02 Dec 2017 08:25:38 +0900
parents cd78711626b9
children 077dc1763239
files s4-funcs.sh
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Sun Sep 24 20:18:16 2017 +0859
     1.2 +++ b/s4-funcs.sh	Sat Dec 02 08:25:38 2017 +0900
     1.3 @@ -459,6 +459,8 @@
     1.4    # s4 specific notation:
     1.5    #   ^href=URL
     1.6    #   ^iframe=URL
     1.7 +  #   [[#NUM]]		- Jump to article ID NUM
     1.8 +  #   [[#Keyword]	- Jump to keywrod search for "Keyword"
     1.9    # OSM umap Wikistyle Notation:
    1.10    #   [[URL]]		- Simle Link
    1.11    #   [[URL|Word]]	- Link with anchor word
    1.12 @@ -467,7 +469,9 @@
    1.13    #   {{{URL}}	}	- <iframe src="URL"></iframe>
    1.14    #   {{{URL|height}}	- <iframe src="URL" height="height"></iframe>
    1.15    _hrefptn="[-A-Za-z0-9,.:;/~_%#&+?=@!]*"
    1.16 +  _hrefptn="[^][()<>]*"
    1.17    sed -e "s|\[\[\#\([0-9][0-9]*\)\]\]|<a href=\"?aid\1\">#\1</a>|g" \
    1.18 +      -e "s|\[\[\#\([^]]*\)\]\]|<a href=\"?kwd=\1\&stage=searchart\">\#\1</a>|g" \
    1.19        -e "s|\[\[\($_hrefptn\)\|\([^]]*\)\]\]|<a href=\"\1\">\2</a>|g" \
    1.20        -e "s|\[\[\($_hrefptn\)\]\]|<a href=\"\1\">\1</a>|" \
    1.21        -e "s|{{{\($_hrefptn\)\|\(.*\)}}}|<iframe src=\"\1\" height=\"\2\"></iframe>|g" \