@liustack/markpress 0.3.1 → 0.3.2

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.
Files changed (2) hide show
  1. package/dist/main.js +4 -2
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -882,7 +882,9 @@ async function render$1(options) {
882
882
  const html = String(file);
883
883
  const outputPath = path.resolve(output);
884
884
  fs.mkdirSync(path.dirname(outputPath), { recursive: true });
885
- fs.writeFileSync(outputPath, html, "utf-8");
885
+ const fileHtml = `<meta charset="utf-8">
886
+ ${html}`;
887
+ fs.writeFileSync(outputPath, fileHtml, "utf-8");
886
888
  let copied = false;
887
889
  if (options.copy) {
888
890
  const { copyToClipboard } = await import("./clipboard-pLkenrrh.js");
@@ -1029,7 +1031,7 @@ function normalizeTarget(input) {
1029
1031
  if (normalized === "x" || normalized === "twitter") return "x";
1030
1032
  throw new Error(`Unsupported target: ${input}. Supported targets: wechat, x, twitter`);
1031
1033
  }
1032
- program.name("markpress").description("Convert Markdown into editor-ready HTML (WeChat MP or X Articles)").version("0.3.1").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) => {
1034
+ program.name("markpress").description("Convert Markdown into editor-ready HTML (WeChat MP or X Articles)").version("0.3.2").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) => {
1033
1035
  try {
1034
1036
  const target = normalizeTarget(options.target);
1035
1037
  const renderer = target === "wechat" ? render$1 : render;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liustack/markpress",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "CLI for AI agents to convert Markdown into WeChat MP-ready HTML with inline styles, base64 images, and tag sanitization",
5
5
  "type": "module",
6
6
  "bin": {