mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 22:40:48 -07:00
fix: raw block not ignoring {% characters, fixes #263
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { Token } from './token'
|
||||
import { WordToken } from './word-token'
|
||||
import { IdentifierToken } from './identifier-token'
|
||||
import { QuotedToken } from './quoted-token'
|
||||
import { TokenKind } from '../parser/token-kind'
|
||||
import { parseStringLiteral } from '../parser/parse-string-literal'
|
||||
|
||||
export class PropertyAccessToken extends Token {
|
||||
constructor (
|
||||
public variable: WordToken | QuotedToken,
|
||||
public props: (WordToken | QuotedToken | PropertyAccessToken)[],
|
||||
public variable: IdentifierToken | QuotedToken,
|
||||
public props: (IdentifierToken | QuotedToken | PropertyAccessToken)[],
|
||||
end: number
|
||||
) {
|
||||
super(TokenKind.PropertyAccess, variable.input, variable.begin, end, variable.file)
|
||||
}
|
||||
|
||||
getVariableAsText() {
|
||||
if (this.variable instanceof WordToken) {
|
||||
getVariableAsText () {
|
||||
if (this.variable instanceof IdentifierToken) {
|
||||
return this.variable.getText()
|
||||
} else {
|
||||
return parseStringLiteral(this.variable.getText())
|
||||
|
||||
Reference in New Issue
Block a user