分析一下markdown和milkdown(或者其他可视化编辑器): markdown其实是底层存储表示, 而milkdown其实对接的一种结构化对象,总体上是 Doc -> Block[] -> Inline[] 。 然后每次可视化编辑,其实是在操作 结构化对象,且每次操作的目标,总是完整的 Block 或 Inline 对象。 但,编辑markdown就不是了,每次改的是字符,完全有可能改成非法的状态。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vim:fdm=manual:sw=2:ts=2:et:ft=gitconfig: | |
| [alias] | |
| b = branch | |
| ba = branch -a | |
| c = commit | |
| cf = config | |
| ci = commit | |
| co = checkout | |
| dc = svn dcommit |
为了更方便阅读 acorn 的代码,我把 acorn 的 parser 都合并到 state.js 内了:
https://github.com/kindy/acorn/blob/vscode-happy/acorn/src/state.js
-- es5 --
declare var NaN
declare var Infinity
declare function eval(x
declare function parseInt(s
declare function parseFloat(string
declare function isNaN(number
declare function isFinite(number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint no-param-reassign: 0 */ | |
| /** | |
| * JavaScript implementation of W3 DOM4 TreeWalker interface. | |
| * | |
| * See also: | |
| * - https://dom.spec.whatwg.org/#interface-treewalker | |
| * | |
| * Attributes like "read-only" and "private" are ignored in this implementation | |
| * due to ECMAScript 3 (as opposed to ES5) not supporting creation of such properties. |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
NewerOlder