mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
Remove patch for multimd, and update package instead
This commit is contained in:
parent
bb464d8a59
commit
2b2070aabe
@ -1,43 +0,0 @@
|
|||||||
diff --git a/index.js b/index.js
|
|
||||||
index 85d89900d5fe575dd0c19430209fb1703b03554e..5fa68cc9a4bd2b21a7188bd263262fd9b1604ac6 100644
|
|
||||||
--- a/index.js
|
|
||||||
+++ b/index.js
|
|
||||||
@@ -145,7 +145,8 @@ module.exports = function multimd_table_plugin(md, options) {
|
|
||||||
colspan, leftToken,
|
|
||||||
rowspan, upTokens = [],
|
|
||||||
tableLines, tgroupLines,
|
|
||||||
- tag, text, range, r, c, b;
|
|
||||||
+ tag, text, range, r, c, b, t,
|
|
||||||
+ blockState;
|
|
||||||
|
|
||||||
if (startLine + 2 > endLine) { return false; }
|
|
||||||
|
|
||||||
@@ -315,18 +316,26 @@ module.exports = function multimd_table_plugin(md, options) {
|
|
||||||
|
|
||||||
/* Multiline. Join the text and feed into markdown-it blockParser. */
|
|
||||||
if (options.multiline && trToken.meta.multiline && trToken.meta.mbounds) {
|
|
||||||
- text = [ text.trimRight() ];
|
|
||||||
+ // Pad the text with empty lines to ensure the line number mapping is correct
|
|
||||||
+ text = new Array(trToken.map[0]).fill('').concat([ text.trimRight() ]);
|
|
||||||
for (b = 1; b < trToken.meta.mbounds.length; b++) {
|
|
||||||
/* Line with N bounds has cells indexed from 0 to N-2 */
|
|
||||||
if (c > trToken.meta.mbounds[b].length - 2) { continue; }
|
|
||||||
range = [ trToken.meta.mbounds[b][c] + 1, trToken.meta.mbounds[b][c + 1] ];
|
|
||||||
text.push(state.src.slice.apply(state.src, range).trimRight());
|
|
||||||
}
|
|
||||||
- state.md.block.parse(text.join('\n'), state.md, state.env, state.tokens);
|
|
||||||
+ blockState = new state.md.block.State(text.join('\n'), state.md, state.env, []);
|
|
||||||
+ blockState.level = trToken.level + 1;
|
|
||||||
+ // Start tokenizing from the actual content (trToken.map[0])
|
|
||||||
+ state.md.block.tokenize(blockState, trToken.map[0], blockState.lineMax);
|
|
||||||
+ for (t = 0; t < blockState.tokens.length; t++) {
|
|
||||||
+ state.tokens.push(blockState.tokens[t]);
|
|
||||||
+ }
|
|
||||||
} else {
|
|
||||||
token = state.push('inline', '', 0);
|
|
||||||
token.content = text.trim();
|
|
||||||
token.map = trToken.map;
|
|
||||||
+ token.level = trToken.level + 1;
|
|
||||||
token.children = [];
|
|
||||||
}
|
|
||||||
|
|
@ -19,7 +19,6 @@ RUN echo "Yarn: $(yarn --version)"
|
|||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
COPY .yarn/patches ./.yarn/patches
|
|
||||||
COPY .yarn/plugins ./.yarn/plugins
|
COPY .yarn/plugins ./.yarn/plugins
|
||||||
COPY .yarn/releases ./.yarn/releases
|
COPY .yarn/releases ./.yarn/releases
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
|
@ -78,8 +78,5 @@
|
|||||||
"node-gyp": "^8.4.1",
|
"node-gyp": "^8.4.1",
|
||||||
"nodemon": "^2.0.9"
|
"nodemon": "^2.0.9"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@3.1.1",
|
"packageManager": "yarn@3.1.1"
|
||||||
"resolutions": {
|
|
||||||
"markdown-it-multimd-table@4.1.1": "patch:markdown-it-multimd-table@npm:4.1.1#.yarn/patches/markdown-it-multimd-table-npm-4.1.1-47e334d4bd"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
"markdown-it-footnote": "^3.0.2",
|
"markdown-it-footnote": "^3.0.2",
|
||||||
"markdown-it-ins": "^3.0.0",
|
"markdown-it-ins": "^3.0.0",
|
||||||
"markdown-it-mark": "^3.0.0",
|
"markdown-it-mark": "^3.0.0",
|
||||||
"markdown-it-multimd-table": "^4.0.1",
|
"markdown-it-multimd-table": "^4.1.2",
|
||||||
"markdown-it-sub": "^1.0.0",
|
"markdown-it-sub": "^1.0.0",
|
||||||
"markdown-it-sup": "^1.0.0",
|
"markdown-it-sup": "^1.0.0",
|
||||||
"markdown-it-toc-done-right": "^4.1.0",
|
"markdown-it-toc-done-right": "^4.1.0",
|
||||||
|
26
yarn.lock
26
yarn.lock
@ -3305,7 +3305,7 @@ __metadata:
|
|||||||
markdown-it-footnote: ^3.0.2
|
markdown-it-footnote: ^3.0.2
|
||||||
markdown-it-ins: ^3.0.0
|
markdown-it-ins: ^3.0.0
|
||||||
markdown-it-mark: ^3.0.0
|
markdown-it-mark: ^3.0.0
|
||||||
markdown-it-multimd-table: ^4.0.1
|
markdown-it-multimd-table: ^4.1.2
|
||||||
markdown-it-sub: ^1.0.0
|
markdown-it-sub: ^1.0.0
|
||||||
markdown-it-sup: ^1.0.0
|
markdown-it-sup: ^1.0.0
|
||||||
markdown-it-toc-done-right: ^4.1.0
|
markdown-it-toc-done-right: ^4.1.0
|
||||||
@ -20420,6 +20420,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"markdown-it-multimd-table@npm:^4.1.2":
|
||||||
|
version: 4.1.2
|
||||||
|
resolution: "markdown-it-multimd-table@npm:4.1.2"
|
||||||
|
dependencies:
|
||||||
|
markdown-it: ^12.3.2
|
||||||
|
checksum: 8f4bff21c085732502803509d61dcb6035dde01670487c2033aa55941156013bdf126e923c11bc5c5eeba1d49dfa6a72bbbedd13bdb7a9df7ee2f0bc1a025e45
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-sub@npm:^1.0.0":
|
"markdown-it-sub@npm:^1.0.0":
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
resolution: "markdown-it-sub@npm:1.0.0"
|
resolution: "markdown-it-sub@npm:1.0.0"
|
||||||
@ -20486,6 +20495,21 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"markdown-it@npm:^12.3.2":
|
||||||
|
version: 12.3.2
|
||||||
|
resolution: "markdown-it@npm:12.3.2"
|
||||||
|
dependencies:
|
||||||
|
argparse: ^2.0.1
|
||||||
|
entities: ~2.1.0
|
||||||
|
linkify-it: ^3.0.1
|
||||||
|
mdurl: ^1.0.1
|
||||||
|
uc.micro: ^1.0.5
|
||||||
|
bin:
|
||||||
|
markdown-it: bin/markdown-it.js
|
||||||
|
checksum: 890555711c1c00fa03b936ca2b213001a3b9b37dea140d8445ae4130ce16628392aad24b12e2a0a9935336ca5951f2957a38f4e5309a2e38eab44e25ff32a41e
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it@npm:^8.4.1":
|
"markdown-it@npm:^8.4.1":
|
||||||
version: 8.4.2
|
version: 8.4.2
|
||||||
resolution: "markdown-it@npm:8.4.2"
|
resolution: "markdown-it@npm:8.4.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user