mikel 0.9.1 → 0.9.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/index.js +2 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -32,7 +32,8 @@ const yamlParser = (str = "") => {
32
32
  level = level - 1;
33
33
  }
34
34
  const isArrayItem = line.trim().startsWith("-");
35
- let [key, value] = line.trim().split(":").map(v => v.trim());
35
+ // TODO: improve the regex to capture the line structure
36
+ let [_, key, value] = (line.trim().match(/^([^:"]*):(.*)$/m) || ["", line]).map(v => v.trim());
36
37
  // Check if is a new item of the array
37
38
  if (isArrayItem) {
38
39
  key = key.replace(/^(- *)/m, "");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mikel",
3
3
  "description": "Micro templating library with zero dependencies",
4
- "version": "0.9.1",
4
+ "version": "0.9.2",
5
5
  "type": "module",
6
6
  "author": {
7
7
  "name": "Josemi Juanes",