Skip to content

Commit

Permalink
fix: handle strings before elements
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Dec 21, 2023
1 parent 091e365 commit 624bbe5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,14 @@ frontmatter_loop:
return z.tt
}

// handle string
if c == '\'' || c == '"' || c == '`' {
z.readString(c)
z.tt = TextToken
z.data.End = z.raw.End
return z.tt
}

s := z.buf[z.raw.Start : z.raw.Start+1][0]

if s == '<' || s == '{' || s == '}' || c == '<' || c == '{' || c == '}' {
Expand All @@ -1892,14 +1900,6 @@ frontmatter_loop:
}
}

// handle string
if c == '\'' || c == '"' || c == '`' {
z.readString(c)
z.tt = TextToken
z.data.End = z.raw.End
return z.tt
}

z.dashCount = 0
continue frontmatter_loop
}
Expand Down

0 comments on commit 624bbe5

Please sign in to comment.