google / google/budoux

ZWSP / WBR insertion causes unintended space trimming on line breaks

Open
#659 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.8k
Forks
45
Avg merge
22h 43m
Merged PRs (30d)
32

Description

When a ZWSP or WBR element appears at the end of a line in source HTML, the space that should be introduced by the line break may be removed. The behavior may vary by browser. Possible solution from the BudouX side is not to insert a separator right before `\n`.

**Demo:** https://codepen.io/tushuhei/pen/GRbraYN

**HTML:**
```html


これは
テスト
です。



これは​
テスト
です。​



これは
テスト
です。


```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.