sommark 2.3.0 → 2.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.3.1 (2026-03-02)
4
+
5
+ ### Fixed
6
+ * Fixed MDX format issue
7
+
3
8
 
4
9
  ## v2.3.0 (2026-02-23)
5
10
 
package/README.md CHANGED
@@ -98,9 +98,9 @@ console.log(await smark.transpile());
98
98
 
99
99
  Detailed guides and API references are available in the `docs/` directory:
100
100
 
101
- - **[Syntax Guide](docs/syntax.md)**: Master SomMark syntax (Blocks, Inline, At-Blocks).
102
- - **[Core API](docs/core.md)**: Programmatic usage of the library (`transpile`, `lex`, `parse`).
103
- - **[Mapper API](docs/mapper.md)**: Guide for creating custom mappers and rules.
104
- - **[CLI Reference](docs/cli.md)**: Command line options and configurations.
101
+ - **[Syntax Guide](docs/03.syntax.md)**: Master SomMark syntax (Blocks, Inline, At-Blocks).
102
+ - **[Core API](docs/09.core.md)**: Programmatic usage of the library (`transpile`, `lex`, `parse`).
103
+ - **[Mapper API](docs/13.mapper.md)**: Guide for creating custom mappers and rules.
104
+ - **[CLI Reference](docs/11.cli.md)**: Command line options and configurations.
105
105
  - **[API Quick Reference](docs/api)**: Fast lookup for all classes and functions.
106
- - **[Configuration Reference](docs/config.md)**: Guide for creating custom configurations.
106
+ - **[Configuration Reference](docs/12.config.md)**: Guide for creating custom configurations.
@@ -119,7 +119,7 @@ async function generateOutput(ast, i, format, mapper_file) {
119
119
  const block_formats = [htmlFormat, mdxFormat, jsonFormat];
120
120
  if (target) {
121
121
  validateRules(target, node.args, "", node.type);
122
- const placeholder = format === mdxFormat && node.body.length > 1 ? "\n<%smark>\n" : "<%smark>";
122
+ const placeholder = format === mdxFormat && node.body.length > 0 ? "\n<%smark>\n" : "<%smark>";
123
123
  result += block_formats.includes(format)
124
124
  ? `${format === mdxFormat ? "\n" : ""}${target.render({ args: node.args, content: placeholder, ast: expose_for_fmts.includes(format) ? ast[i] : null }) + (format === mdxFormat ? "\n" : "")}`
125
125
  : target.render({ args: node.args, content: "" }) + (format === mdxFormat ? "\n" : "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sommark",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "SomMark is a structural markup language for writing structured documents and converting them into HTML or Markdown or MDX(only ready components).",
5
5
  "main": "index.js",
6
6
  "directories": {