Results 45 comments of null

@freezed-corpse-143 My apologies. I find the implementation of submitting a token after text selection a little strange. But I haven't had a chance to research the interaction design of other...

@wgy981930674 好的,感谢反馈。 功能有点多,为了隔离影响,我现在先将我手头的 commit 发出去。接着再挨个处理你的功能代码。

@wgy981930674 你好,我看了半天,没想到你更新代码了。浪费了不少时间。 --- ## 关于在 fence_enhance 里注释中的 `???` Typora 的代码块是基于 [codeMirror](https://codemirror.net/5/doc/manual.html) 的,因此我们最好通过 `File.editor.fences.queue[cid]` 来获取 codeMirror 的实例对象,接着调用实例对象的方法实现功能。 比如 `let gutterArr = fence.querySelectorAll('.CodeMirror-linenumber')` 就可以改成如下代码: ```js linenumColor = (ev, button) => { const...

你可以试着通过 cm 对象的方法/属性 改造 linenumColor 函数。 比如 `cont.split(breakStr)` 获取每行内容的实现就比较野,比较 foolproof 的方案应该是调用 `cm.getLine(lineNumber-1)` (减一是由于从 0 计数) --- 同时,我感觉这个功能应该加一个 rollback 逻辑。第一次点击添加颜色,第二次点击 rollback 回原始状态。

@wgy981930674 关于历史光标前进后退问题,其实是可以监听 cursorChange 事件的,我们可以在回调函数里存储 cursor 的状态,这样效率更高 ```js const cursorStates = [] $('#write').on("cursorChange", function (ev, t) { console.log(t.cursor) // t.cursor 是一个 rangy 对象,可以用此纪录光标的位置 cursorStates.push(t) }) ``` - t.cursor 是一个 [rangy](https://github.com/timdown/rangy) 对象,具体使用可以看库的教程,也可以在现有的插件搜索...

我调研了很多 md 软件,都不支持此功能,加上此功能副作用比较大,容易产生各式问题,故暂时不实现,抱歉。

@wgy981930674 这里有个比较大的问题:如果文件存在相同名称的标题咋整?

markmap 使用的 [email protected] 没有 mhchem 包,应该是显示不了的。 我明天看看有没有可能把 Typora(使用的是 Mathjax) 的 mhchem 集成到 markmap 的 katex 中。不过我觉得大概率不行。

试了好久,不太行。我放弃了。此 issue 关闭,抱歉。

Here is my simple implementation: ```js const { addErrorContext, isBlankLine } = require("markdownlint-rule-helpers") const { getParentOfType, filterByTypes } = require("markdownlint-rule-helpers/micromark") const mathBlockPrefixRe = /^(.*?)[$\[]/ // eslint-disable-next-line jsdoc/valid-types /** @typedef {readonly...