1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Fixes #6074: Scroll jumps when typing if heavy scripts or many large elements are used (#6383)

This commit is contained in:
Kenichi Kobayashi
2022-04-10 19:31:17 +09:00
committed by GitHub
parent e02422070e
commit f6e21e0180
7 changed files with 35 additions and 11 deletions

View File

@ -22,8 +22,10 @@ export default {
markdownIt.renderer.rules[key] = (tokens: any[], idx: number, options: any, env: any, self: any) => {
if (!!tokens[idx].map && tokens[idx].level <= allowedLevel) {
const line = tokens[idx].map[0];
const lineEnd = tokens[idx].map[1];
tokens[idx].attrJoin('class', 'maps-to-line');
tokens[idx].attrSet('source-line', `${line}`);
tokens[idx].attrSet('source-line-end', `${lineEnd}`);
}
if (precedentRule) {
return precedentRule(tokens, idx, options, env, self);