やるきなし

2022/10/30 15:05 / pandoc で生成される HTML における改行の扱い

Debian GNU/Linux 11 (bullseye)

 % pandoc -v
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5
Default user data directory: /home/myn/.local/share/pandoc or /home/myn/.pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
 % pandoc
test
ててててててててててててててててててててててててててててててててててててててててててててて
<p>test ててててててててててててててててててててててててててててててててててててててててててててて</p>

Debian GNU/Linux unstable (sid)

 % pandoc -v
pandoc 2.17.1.1
Compiled with pandoc-types 1.22.2.1, texmath 0.12.4, skylighting 0.12.3.1,
citeproc 0.6.0.1, ipynb 0.2
User data directory: /home/myn/.local/share/pandoc
Copyright (C) 2006-2022 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
 % pandoc
test
ててててててててててててててててててててててててててててててててててててててててててててて
<p>test
ててててててててててててててててててててててててててててててててててててててててててててて</p>

という感じで sid (unstable) の pandoc は,長すぎる行はできるだけ短くなるように,改行を入れても問題ない箇所に改行を入れる.Debian GNU/Linux 11 (bullseye) を同じ挙動をさせるためには --wrap option を使う.

% pandoc --wrap=none
test
ててててててててててててててててててててててててててててててててててててててててててててて
<p>test ててててててててててててててててててててててててててててててててててててててててててててて</p>

Related articles