mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
docs: support data field in playground.html
This commit is contained in:
@@ -37,7 +37,12 @@ hexo.extend.helper.register('page_nav', function () {
|
||||
})
|
||||
|
||||
hexo.extend.helper.register('raw', function (filepath) {
|
||||
const content = readFileSync(resolve(this.view_dir, filepath))
|
||||
const content = readFileSync(resolve(this.view_dir, filepath), 'utf8')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
return content
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user