I could find a way to remove unwanted space rendered by linebreaks in the paragraph.
During the exploring solution, I tried first to write a syntax plugin that uses "lookbehind"
regular expression
(?<!\n)\n(?!\n]) which does not work as expected.
Then I could find
xbr plugin that provides a replacement DokuWiki standard xhtml renderer.
Admin can change through renderer_xhtml configuration setting.
The xbr render plugin can replace linebreaks to <br> tag. I rewrote the code for just removing linebreaks from xhtml output.
The following source text (written in Japanese) folded in arbitrary line length
とっても長い文章は、適当な位置で改行
すると読みやすくなります。ページ上では
改行位置に空白が挿入されません。
will be rendered by modified renderer:
とっても長い文章は、適当な位置で改行すると読みやすくなります。ページ上では改行位置に空白が挿入されません。
comparing standard xhml renderer output:
とっても長い文章は、適当な位置で改行␣すると読みやすくなります。ページ上では␣改行位置に空白が挿入されません。
Another example, the following English source
This is a long sentence that is intentio
nally folded using line break at any len
gth. The line break char ''**\n**'' at t
he end of line will be removed and conca
tenated with next line.
will be rendered by modified renderer as:
This is a long sentence that is intentionally folded using line break at any length. The line break char \n at the end of line will be removed and concatenated with next line.
comparing standard xhml renderer output (note: spaces replaced with ␣ for explanation purpose):
This is a long sentence that is intentio␣nally folded using line break at any len␣gth. The line break char \n at t␣he end of line will be removed and conca␣tenated with next line.