@liustack/markpress 0.3.2 → 0.3.3
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/main.js +3 -2
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -568,7 +568,8 @@ const defaultStyles = {
|
|
|
568
568
|
li: `${F} margin: 0.4em 0; color: #1d1d1f;`,
|
|
569
569
|
// Links — WeChat blue
|
|
570
570
|
a: "color: #576b95; text-decoration: none;",
|
|
571
|
-
// Images
|
|
571
|
+
// Images — no top margin: when image is the first element (e.g. cover),
|
|
572
|
+
// top margin creates excessive spacing in WeChat editor.
|
|
572
573
|
img: "max-width: 100%; height: auto; display: block; margin: 0 auto 1.5em; border-radius: 10px;",
|
|
573
574
|
// Tables — minimalist: collapse borders, thin lines
|
|
574
575
|
table: `${F} width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; border-radius: 2px;`,
|
|
@@ -1031,7 +1032,7 @@ function normalizeTarget(input) {
|
|
|
1031
1032
|
if (normalized === "x" || normalized === "twitter") return "x";
|
|
1032
1033
|
throw new Error(`Unsupported target: ${input}. Supported targets: wechat, x, twitter`);
|
|
1033
1034
|
}
|
|
1034
|
-
program.name("markpress").description("Convert Markdown into editor-ready HTML (WeChat MP or X Articles)").version("0.3.
|
|
1035
|
+
program.name("markpress").description("Convert Markdown into editor-ready HTML (WeChat MP or X Articles)").version("0.3.3").requiredOption("-i, --input <path>", "Input Markdown file path").requiredOption("-o, --output <path>", "Output HTML file path").option("-t, --target <target>", "Render target: wechat | x | twitter", "wechat").option("-c, --copy", "Copy rendered HTML to system clipboard").action(async (options) => {
|
|
1035
1036
|
try {
|
|
1036
1037
|
const target = normalizeTarget(options.target);
|
|
1037
1038
|
const renderer = target === "wechat" ? render$1 : render;
|
package/package.json
CHANGED