mikel 0.35.1 → 0.36.0

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
@@ -174,7 +174,7 @@ const compile = (ctx, tokens, output, data, state, index = 0, section = "") => {
174
174
  }
175
175
  else if (tokens[i].startsWith(">")) {
176
176
  const [t, args, opt] = parseArgs(tokens[i].replace(/^>{1,2}/, ""), data, state);
177
- const blockContent = []; // to store partial block content
177
+ const j = i + 1, blockContent = []; // to store partial block content
178
178
  if (tokens[i].startsWith(">>")) {
179
179
  i = compile(ctx, tokens, blockContent, data, state, i + 1, t);
180
180
  }
@@ -190,6 +190,7 @@ const compile = (ctx, tokens, output, data, state, index = 0, section = "") => {
190
190
  args: args || [],
191
191
  options: opt || {},
192
192
  context: partialData,
193
+ rawContent: i > j ? untokenize(tokens.slice(j, i)) : "",
193
194
  },
194
195
  };
195
196
  compile(ctx, tokenize(partialBody), output, partialData, partialState, 0, "");
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.35.1",
4
+ "version": "0.36.0",
5
5
  "type": "module",
6
6
  "author": {
7
7
  "name": "Josemi Juanes",