@wdprlib/decompiler 0.1.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -2
- package/dist/index.js +9 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1730,9 +1730,16 @@ function serializeTable(ctx, data) {
|
|
|
1730
1730
|
prefix += "<";
|
|
1731
1731
|
}
|
|
1732
1732
|
const innerCtx = new SerializeContext({ newline: ctx.newline });
|
|
1733
|
+
innerCtx.forceLineBreakSyntax = true;
|
|
1733
1734
|
serializeElements(innerCtx, cell.elements);
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1735
|
+
const raw = innerCtx.getOutput();
|
|
1736
|
+
const content = raw.replace(/\n$/, "");
|
|
1737
|
+
const nl = ctx.newline;
|
|
1738
|
+
if (raw.endsWith(` _${nl}`)) {
|
|
1739
|
+
ctx.push(`${prefix} ${content}${nl}`);
|
|
1740
|
+
} else {
|
|
1741
|
+
ctx.push(`${prefix} ${content} `);
|
|
1742
|
+
}
|
|
1736
1743
|
}
|
|
1737
1744
|
ctx.pushLine("||");
|
|
1738
1745
|
}
|
package/dist/index.js
CHANGED
|
@@ -1692,9 +1692,16 @@ function serializeTable(ctx, data) {
|
|
|
1692
1692
|
prefix += "<";
|
|
1693
1693
|
}
|
|
1694
1694
|
const innerCtx = new SerializeContext({ newline: ctx.newline });
|
|
1695
|
+
innerCtx.forceLineBreakSyntax = true;
|
|
1695
1696
|
serializeElements(innerCtx, cell.elements);
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1697
|
+
const raw = innerCtx.getOutput();
|
|
1698
|
+
const content = raw.replace(/\n$/, "");
|
|
1699
|
+
const nl = ctx.newline;
|
|
1700
|
+
if (raw.endsWith(` _${nl}`)) {
|
|
1701
|
+
ctx.push(`${prefix} ${content}${nl}`);
|
|
1702
|
+
} else {
|
|
1703
|
+
ctx.push(`${prefix} ${content} `);
|
|
1704
|
+
}
|
|
1698
1705
|
}
|
|
1699
1706
|
ctx.pushLine("||");
|
|
1700
1707
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdprlib/decompiler",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "HTML to Wikidot markup decompiler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decompiler",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@wdprlib/ast": "1.2.
|
|
41
|
+
"@wdprlib/ast": "1.2.1",
|
|
42
42
|
"domhandler": "^5.0.3",
|
|
43
43
|
"htmlparser2": "^10.0.0"
|
|
44
44
|
}
|