s4

changeset 851:7ca68e8c2702

Attribute "start=" passed to OL
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 30 Jun 2020 08:52:20 +0900
parents f11b80b4d005
children 3e09ac711f69
files s4-funcs.sh
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-funcs.sh	Tue Jun 30 08:33:54 2020 +0900
     1.2 +++ b/s4-funcs.sh	Tue Jun 30 08:52:20 2020 +0900
     1.3 @@ -705,8 +705,11 @@
     1.4  	:top
     1.5  	 s/\n//;
     1.6  	 s/^  *//;			# 2周目以降: 行頭空白削除
     1.7 -	 s,[1-9][0-9]*\. ,,;			# まず行頭の "* " を消しておく
     1.8  	 H;				# 置き換え結果をホールドスペースに追加
     1.9 +	 x;
    1.10 +	 s,^<ol>\n\([1-9][0-9]*\)\. ,<ol start="\1"><li>,;	# 1行目のみ
    1.11 +	 s,[1-9][0-9]*\. ,,;			# まず行頭の "N. " を消しておく
    1.12 +	 x;
    1.13  	 s/.*//;			# パターンスペースは消しておく
    1.14  	 # ↓最終行なら残ったホールドスペース処理のため :cont へ
    1.15  	 $ b cont