feat: support Jekyll-like include syntax, see #441

This commit is contained in:
Harttle
2022-01-19 23:07:25 +08:00
committed by Harttle
parent d71d0a0c20
commit 388d0fbbc4
7 changed files with 141 additions and 11 deletions
+2 -2
View File
@@ -16,9 +16,9 @@ export interface HashValue {
*/
export class Hash {
hash: HashValue = {}
constructor (markup: string) {
constructor (markup: string, jekyllStyle?: boolean) {
const tokenizer = new Tokenizer(markup, {})
for (const hash of tokenizer.readHashes()) {
for (const hash of tokenizer.readHashes(jekyllStyle)) {
this.hash[hash.name.content] = hash.value
}
}