Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 4, 2023
1 parent 0d9b8fe commit e923a88
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/protyle/hint/index.ts
Expand Up @@ -898,7 +898,14 @@ ${genHintItemHTML(item)}
this.lastIndex = -1;
this.splitChar = "";
extend.forEach((item) => {
const currentLastIndex = currentLineValue.lastIndexOf(item.key);
let currentLastIndex = currentLineValue.lastIndexOf(item.key);
// https://ld246.com/article/1701670704754
if (Constants.BLOCK_HINT_KEYS.includes(item.key) && currentLastIndex > -1) {
const thirdLastIndex = currentLineValue.lastIndexOf(item.key + item.key.substring(0, 1))
if (thirdLastIndex > -1) {
currentLastIndex = Math.min(currentLastIndex, currentLineValue.lastIndexOf(item.key + item.key.substring(0, 1)))
}
}
if (this.lastIndex < currentLastIndex) {
if (Constants.BLOCK_HINT_KEYS.includes(this.splitChar) &&
(item.key === ":" || item.key === "#" || item.key === "/" || item.key === "、")) {
Expand Down

0 comments on commit e923a88

Please sign in to comment.