mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 22:22:18 +08:00
parent
991441190d
commit
d9f64bab58
@ -34,13 +34,14 @@ const updateCtrl = ContentState => {
|
||||
}
|
||||
|
||||
ContentState.prototype.checkNeedRender = function (cursor = this.cursor) {
|
||||
const { labels } = this.stateRender
|
||||
const { start: cStart, end: cEnd } = cursor
|
||||
const startBlock = this.getBlock(cStart.key)
|
||||
const endBlock = this.getBlock(cEnd.key)
|
||||
const startOffset = cStart.offset
|
||||
const endOffset = cEnd.offset
|
||||
|
||||
for (const token of tokenizer(startBlock.text)) {
|
||||
for (const token of tokenizer(startBlock.text, undefined, undefined, labels)) {
|
||||
if (token.type === 'text') continue
|
||||
const { start, end } = token.range
|
||||
const textLen = startBlock.text.length
|
||||
@ -50,7 +51,7 @@ const updateCtrl = ContentState => {
|
||||
return true
|
||||
}
|
||||
}
|
||||
for (const token of tokenizer(endBlock.text)) {
|
||||
for (const token of tokenizer(endBlock.text, undefined, undefined, labels)) {
|
||||
if (token.type === 'text') continue
|
||||
const { start, end } = token.range
|
||||
const textLen = endBlock.text.length
|
||||
|
@ -203,7 +203,6 @@ class Keyboard {
|
||||
if (!start || !end) {
|
||||
return
|
||||
}
|
||||
|
||||
if (
|
||||
!this.isComposed
|
||||
) {
|
||||
|
@ -6,6 +6,7 @@ export default function referenceLink (h, cursor, block, token, outerClass) {
|
||||
const labelClass = className === CLASS_OR_ID['AG_GRAY']
|
||||
? CLASS_OR_ID['AG_REFERENCE_LABEL']
|
||||
: className
|
||||
|
||||
const { start, end } = token.range
|
||||
const {
|
||||
anchor,
|
||||
|
Loading…
Reference in New Issue
Block a user