koishi-plugin-cfmrmod 1.0.6 → 1.0.7
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/README.md +2 -0
- package/dist/mcmod/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/mcmod/index.js
CHANGED
|
@@ -564,7 +564,7 @@ async function drawModCard(url) {
|
|
|
564
564
|
versions.forEach(v => {
|
|
565
565
|
dummy.font = `14px "${font}"`;
|
|
566
566
|
const lw = dummy.measureText(v.l).width + 10;
|
|
567
|
-
const lines = wrapText(dummy, v.v, 0, 0, contentW - lw, 20,
|
|
567
|
+
const lines = wrapText(dummy, v.v, 0, 0, contentW - lw, 20, 500, false) / 20;
|
|
568
568
|
extraH += lines * 20 + 10;
|
|
569
569
|
});
|
|
570
570
|
}
|
|
@@ -578,7 +578,7 @@ async function drawModCard(url) {
|
|
|
578
578
|
const isHeader = node.tag === 'h';
|
|
579
579
|
dummy.font = `${isHeader ? 'bold' : ''} ${isHeader ? 22 : 16}px "${font}"`;
|
|
580
580
|
const lh = isHeader ? 32 : 26;
|
|
581
|
-
const lines = wrapText(dummy, node.val, 0, 0, contentW, lh,
|
|
581
|
+
const lines = wrapText(dummy, node.val, 0, 0, contentW, lh, 5000, false) / lh;
|
|
582
582
|
descH += lines * lh + (isHeader ? 15 : 10);
|
|
583
583
|
}
|
|
584
584
|
else if (node.type === 'i') {
|