HTML青空文庫変換で傍点と傍線をパースしたが、ブラウザで縦書きにすると、下線と傍線で表示が異なる。 text-decoration: underline; 縦書きだと右側に線 text-decoration: overline; 縦書きだと左側に線 EPUBだと表示が逆
turndownの傍線と傍点の変換
rules.sesame = { filter: function (node, options) { return ( node.nodeName === 'SPAN' && node.getAttribute('class') === 'em-sesame' ) }, replacement: function (content, node, options) { return '[#傍点]'+ content + '[#傍点終わり]' } } rules.line = { filter: function (node, options) { return ( node.nodeName === 'SPAN' && node.getAttribute('class') === 'em-line' ) }, replacement: function (content, node, options) { return '[#傍線]'+ content + '[#傍線終わり]' } }
1字下げ
HTMLから青空文庫への変換は様になってきたけど、青空文庫HTML変換がクラス指定が違うのが気になっている。