mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 13:58:49 +01:00
This commit is contained in:
parent
c248faed49
commit
cccd44c00c
1 changed files with 1 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ const getHightlightCoordsByRange = (pdf: any, color: string) => {
|
|||
// https://github.com/siyuan-note/siyuan/issues/5213
|
||||
const rangeContents = range.cloneContents();
|
||||
Array.from(rangeContents.children).forEach(item => {
|
||||
if (item.tagName === "BR") {
|
||||
if (item.tagName === "BR" && item.previousElementSibling && item.nextElementSibling) {
|
||||
const previousText = item.previousElementSibling.textContent;
|
||||
const nextText = item.nextElementSibling.textContent;
|
||||
if (previousText.endsWith("-") && /^[A-Za-z]$/.test(previousText.substring(previousText.length - 2, previousText.length - 1)) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue