diff --git a/background-script.js b/background-script.js index 2aa2a41..b1a6ede 100644 --- a/background-script.js +++ b/background-script.js @@ -185,7 +185,7 @@ rules.push({type: "neverfinalrule" , dec_end: ["く","す","つ","う","る","ぐ","ぶ","ぬ","む","う","く"] , con_end: -["か","せ","て","わ","ら","が","ば","な","ま","わ","か"] +["か","さ","た","わ","ら","が","ば","な","ま","わ","か"] , dec_tag: ["v5k","v5s","v5t","v5u","v5r","v5g","v5b","v5n","v5m","v5u-s","v5k-s"] // TODO: support あらへん, あらぬ, etc , con_tag:"stem-a", detail:"('a' stem)"}); diff --git a/texthook.js b/texthook.js index 28cf43c..c20ec75 100644 --- a/texthook.js +++ b/texthook.js @@ -242,14 +242,18 @@ function build_div (text, result) { if(form.process.length > 0) temptag += "~"; + let added = 0; for(let f = form.process.length-1; f >= 0; f--) { let info = form.process[f]; + if(info == "") + continue; if(info.startsWith("(") && info.endsWith(")") && f != 0) continue; - temptag += info; - if(f > 0) + if(added > 0) temptag += "―"; + added++; + temptag += info; } } } @@ -328,14 +332,18 @@ function build_div (text, result) { if(form.process.length > 0) temptag += "~"; + let added = 0; for(let f = form.process.length-1; f >= 0; f--) { let info = form.process[f]; + if(info == "") + continue; if(info.startsWith("(") && info.endsWith(")") && f != 0) continue; - temptag += info; - if(f > 0) + if(added > 0) temptag += "―"; + added++; + temptag += info; } } }