Skip to content

Commit 7376270

Browse files
committed
minor, removed unused var from testing
1 parent cab7273 commit 7376270

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ npm install @nartix/tiptap-inline-code-highlight
99
```
1010

1111
```javascript
12-
import { CodeInlineLowlight } from '@nartix/tiptap-inline-code-highlight';
12+
import CodeInlineLowlight from '@nartix/tiptap-inline-code-highlight';
1313

1414
const editor = Editor({
1515
extensions: [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nartix/tiptap-inline-code-highlight",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Inline code highlight extension for Tiptap editor.",
55
"main": "src/index.js",
66
"scripts": {

src/code-inline-lowlight.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ function getDecorations({ doc, name, lowlight }) {
3131

3232
findInlineCode(doc, name).forEach((block) => {
3333
let from = block.from;
34-
const to = block.to;
3534

3635
const nodes = getHighlightNodes(lowlight.highlightAuto(block.text));
3736

@@ -60,7 +59,7 @@ function findInlineCode(doc, markType) {
6059
from: pos,
6160
to: pos + node.nodeSize,
6261
text: node.text,
63-
node: mark,
62+
// node: mark,
6463
});
6564
}
6665
});
@@ -78,15 +77,14 @@ export const CodeInlineLowlight = Extension.create({
7877
addOptions() {
7978
return {
8079
lowlight: {},
81-
defaultLanguage: null,
8280
};
8381
},
8482

8583
addProseMirrorPlugins() {
8684
if (!['highlight', 'highlightAuto', 'listLanguages'].every((api) => isFunction(this.options.lowlight[api]))) {
87-
throw Error('You should provide an instance of lowlight to use the tiptap-code-inline-highlight extension');
85+
throw Error('You should provide an instance of lowlight to use the @nartix/tiptap-code-inline-highlight extension');
8886
}
89-
const pluginKey = new PluginKey('codeInlineLowlight');
87+
const pluginKey = new PluginKey(this.name);
9088
return [
9189
new Plugin({
9290
key: pluginKey,
@@ -117,7 +115,6 @@ export const CodeInlineLowlight = Extension.create({
117115
lowlight: this.options.lowlight,
118116
});
119117
}
120-
121118
return set.map(tr.mapping, tr.doc);
122119
},
123120
},

0 commit comments

Comments
 (0)