comparison s4-funcs.sh @ 486:44b4a45e2617

Emphasizing pattherns like *word* should have surrounding spaces.
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 06 Feb 2018 11:16:54 +0900
parents 021e7943fd99
children 075897fee2c0
comparison
equal deleted inserted replaced
485:021e7943fd99 486:44b4a45e2617
488 -e "s|^iframe=\($_hrefptn\)|<iframe src=\"\1\"></iframe>|" \ 488 -e "s|^iframe=\($_hrefptn\)|<iframe src=\"\1\"></iframe>|" \
489 -e "s,^#### *\(.*\),<h4>\1</h4>," \ 489 -e "s,^#### *\(.*\),<h4>\1</h4>," \
490 -e "s,^### *\(.*\),<h3>\1</h3>," \ 490 -e "s,^### *\(.*\),<h3>\1</h3>," \
491 -e "s,^## *\(.*\),<h2>\1</h2>," \ 491 -e "s,^## *\(.*\),<h2>\1</h2>," \
492 -e 's,^----*$,<hr>,' \ 492 -e 's,^----*$,<hr>,' \
493 -e 's,\*\*\([^* |][^*|]*[^ |]\)\*\*,<strong>\1</strong>,g' \ 493 -e 's, \*\*\([^* |][^*|]*[^ |]\)\*\* ,<strong>\1</strong>,g' \
494 -e 's,__\([^_ |][^_]*[^ ]\)__,<strong>\1</strong>,g' \ 494 -e 's, __\([^_ |][^_]*[^ ]\)__ ,<strong>\1</strong>,g' \
495 -e 's,\*\([^* |][^*|]*[^ |]\)\*,<em>\1</em>,g' \ 495 -e 's, \*\([^* |][^*|]*[^ |]\)\* ,<em>\1</em>,g' \
496 -e 's,_\([^_ ][^_]*[^ ]\)_,<em>\1</em>,g' 496 -e 's, _\([^_ ][^_]*[^ ]\)_ ,<em>\1</em>,g'
497 } 497 }
498 minitbl() { 498 minitbl() {
499 sed -n ' 499 sed -n '
500 /^|.*|/ {; # If the line begin with "|" and has 2 or more "|" 500 /^|.*|/ {; # If the line begin with "|" and has 2 or more "|"
501 s,|$,,; # Remove trailing "|" first 501 s,|$,,; # Remove trailing "|" first

yatex.org