Skip to content

Commit

Permalink
Fix initializing tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes authored Dec 23, 2024
1 parent 76e2313 commit 2d05268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const frontmatter = (str = "", parser = null) => {
// @description parse a template string
const parseTemplate = (templateStr = "") => {
let i = 0;
const tokens, inlinePartials = {}, allTokens = templateStr.split(tags);
const tokens = [], inlinePartials = {}, allTokens = templateStr.split(tags);
while (i < allTokens.length) {
// if current token is a partial token
if (i % 2 !== 0 && allTokens[i].trim().startsWith("<")) {
Expand Down

0 comments on commit 2d05268

Please sign in to comment.