s4
diff s4-funcs.sh @ 485:021e7943fd99
Emphasis pattern *word*, _word_ and strong pattern **word**, __word__
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 06 Feb 2018 11:06:10 +0900 |
parents | be821d63848c |
children | 44b4a45e2617 |
line diff
1.1 --- a/s4-funcs.sh Fri Feb 02 09:45:55 2018 +0900 1.2 +++ b/s4-funcs.sh Tue Feb 06 11:06:10 2018 +0900 1.3 @@ -468,6 +468,12 @@ 1.4 # {{URL|width}} - <img src="URL" width="width"> 1.5 # {{{URL}} } - <iframe src="URL"></iframe> 1.6 # {{{URL|height}} - <iframe src="URL" height="height"></iframe> 1.7 + # Other Style 1.8 + # ---- - <hr> (In the beginning of line) 1.9 + # *Word* - <em>Word</em> 1.10 + # _Word_ - <em>Word</em> 1.11 + # **Word** - <strong>Word</strong> 1.12 + # __Word__ - <strong>Word</strong> 1.13 _hrefptn="[-A-Za-z0-9,.:;/~_%#&+?=@!]*" 1.14 _hrefptn="[A-Za-z0-9/~%+?=@!.][^][()<> ]*" # URL should start with ASCII 1.15 sed -e "s|\[\[\#\([0-9][0-9]*\)\]\]|<a href=\"?aid\1\">#\1</a>|g" \ 1.16 @@ -483,7 +489,11 @@ 1.17 -e "s,^#### *\(.*\),<h4>\1</h4>," \ 1.18 -e "s,^### *\(.*\),<h3>\1</h3>," \ 1.19 -e "s,^## *\(.*\),<h2>\1</h2>," \ 1.20 - -e 's,^----*$,<hr>,' 1.21 + -e 's,^----*$,<hr>,' \ 1.22 + -e 's,\*\*\([^* |][^*|]*[^ |]\)\*\*,<strong>\1</strong>,g' \ 1.23 + -e 's,__\([^_ |][^_]*[^ ]\)__,<strong>\1</strong>,g' \ 1.24 + -e 's,\*\([^* |][^*|]*[^ |]\)\*,<em>\1</em>,g' \ 1.25 + -e 's,_\([^_ ][^_]*[^ ]\)_,<em>\1</em>,g' 1.26 } 1.27 minitbl() { 1.28 sed -n '