sommark 2.1.0 → 2.1.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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.1.1 (2026-02-09)
4
+ ### Fixes
5
+ - Fixed undefined or null arguments
6
+
3
7
  ## v2.1.0 (2026-02-08)
4
8
 
5
9
  ### Fixes
package/README.md CHANGED
@@ -122,7 +122,8 @@ Raw content here.
122
122
  @_end_@
123
123
 
124
124
  [end]
125
- ```
125
+ ```
126
+
126
127
 
127
128
  * **Identifiers**: Names can only contain letters and numbers.
128
129
  * **Escape Character**: Use the backslash `\` to escape special characters (like colons or commas) inside arguments.
@@ -34,7 +34,7 @@ function validateRules(target, args, content) {
34
34
  const { id } = target;
35
35
 
36
36
  // Validate Args
37
- if (rules.args) {
37
+ if (args && rules.args) {
38
38
  const { min, max, required, includes } = rules.args;
39
39
  const argKeys = Object.keys(args).filter(key => isNaN(parseInt(key))); // Get named keys
40
40
  const argValues = Object.values(args);
@@ -78,7 +78,7 @@ function validateRules(target, args, content) {
78
78
  }
79
79
 
80
80
  // Validate Content
81
- if (rules.content) {
81
+ if (content && rules.content) {
82
82
  const { maxLength } = rules.content;
83
83
  if (maxLength && content.length > maxLength) {
84
84
  transpilerError([
@@ -88,7 +88,7 @@ function validateRules(target, args, content) {
88
88
  }
89
89
  }
90
90
  // Validate is_Self_closing
91
- if (rules.is_Self_closing) {
91
+ if (id && rules.is_Self_closing) {
92
92
  if (content) {
93
93
  transpilerError([
94
94
  "{line}<$red:Validation Error:$> ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sommark",
3
- "version": "2.1.0",
3
+ "version": "2.1.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": {