Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
pug#3299: pug-lexer
node v10.24.1
version:
master
endpoint
share
tweet
const assert = require('assert') const { Lexer } = require('pug-lexer') const code = ` p \\#{value} p \\!{value} ` const lexer = new Lexer(code, { filename: 'index.pug' }) const tokens = lexer.getTokens() console.log(tokens) assert( tokens[2].val === '#{value}', `1. expect "#{value}", actual: "${tokens[2].val}"` ) assert( tokens[5].val === '!{value}', `2. expect "!{value}", actual: "${tokens[5].val}"` )
Created from: https://npm.runkit.com/pug-lexer
Loading…
no comments
sign in
to comment