Strict Line Breaks Mode Should Respect Language-Specific Spacing Rules

Description

In Strict Line Breaks mode, Obsidian currently renders single line breaks (\n) as spaces uniformly across all languages. However, different languages have distinct typographic conventions regarding line breaks:

Language Type Example Languages Expected Line Break Behavior
Space-requiring English, French, German Line1\nLine2 → Line1 Line2
Non-space-requiring Chinese, Japanese 行1\n行2 → 行1行2

Current behavior forces space insertion even in languages where it’s typographically incorrect.

Steps to Reproduce

  1. Enable Strict Line Breaks in Settings → Editor
  2. Create test file with:
English
requires space

中文
不需要空格

Français
espace nécessaire

日本語
スペース不要
  1. Observe rendered output shows spaces after all line breaks

Expected Behavior

The renderer should:

  1. Detect language type (space-requiring vs. non-space-requiring)
  2. Apply appropriate line break rendering:
  • Space-requiring: Insert space ( )
  • Non-space-requiring: No space (direct concatenation)

Proposed Solution

  1. Language Detection:
  • Use Unicode ranges to identify language types:
    • CJK: U+4E00-U+9FFF, U+3040-U+30FF, etc.
    • Space-requiring: Latin (U+0000-U+007F extended)
  1. Render Logic:
function renderLineBreak(text) {
    const isCJK = /[\u4e00-\u9fff\u3040-\u30ff\uac00-\ud7af]/.test(text);
    return isCJK ? "" : " ";
}

Hello.

Can this be solved by using a zero-width space before each line break? Or does it still look wrong in the sample below?

==WITH== ZERO-WIDTH SPACE  
中文​
不需要空格

WITHOUT ZERO-WIDTH SPACE  
中文
不需要空格

==WITH== ZERO-WIDTH SPACE  
日本語​
スペース不要

WITHOUT ZERO-WIDTH SPACE  
日本語
スペース不要

This is an interesting observation, however it isn’t not how markdown currently works (or specifically commonmark which we follow).

You can open a Feature Request to ask as to deviate from commonmark.
You may also be interested in this other FR.

Thank you for all you reply.
And I open a Feature Request here as a solution.