Commit 300ebed
committed
fix: fix paragraph attributes not finished on last paragraph
For the following example BBCode:
```
[code]
xxx
[/code]
```
the parsed quill delta as a '\n' as the last operation which also have a
code-block attribute. It's not added to meet "always ended with '\n'"
purpose but to finish the code block paragraph attribute.
In previous versions, when `insertBBCode`, the last paragraph would be
removed if it only has a '\n', considered as the meet of "always ended
with '\n'", we shall not that if the paragraph has paragraph attributes:
in this condition, '\n' is to finish the paragraph attribute.
This commit added another condition to skip removing the last operation
if paragraph has attributes.1 parent 942e3c2 commit 300ebed
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
186 | 189 | | |
187 | 190 | | |
188 | 191 | | |
| |||
0 commit comments