MCPcopy Create free account
hub / github.com/marktext/marktext / constructor

Method constructor

packages/muya/src/block/commonMark/codeBlock/code.ts:70–78  ·  view source on GitHub ↗
(muya: Muya, withLineNumbers: boolean = false)

Source from the content-addressed store, hash-verified

68 }
69
70 constructor(muya: Muya, withLineNumbers: boolean = false) {
71 super(muya);
72 this.tagName = 'code';
73 this.classList = ['mu-code'];
74 this._withLineNumbers = withLineNumbers;
75 this.createDomNode();
76 this.createCopyNode();
77 this.listen();
78 }
79
80 override getState(): TState {
81 debug.warn('You can never call `getState` in code');

Callers

nothing calls this directly

Calls 3

createCopyNodeMethod · 0.95
listenMethod · 0.95
createDomNodeMethod · 0.45

Tested by

no test coverage detected