解决Jekyll博客代码块中包含%报错问题

 阅读


刚刚又水了一篇博客,在执行jekyll server的时候居然报错了

Liquid Exception: Liquid syntax error (line 13): Tag '{%' was not properly terminated with regexp: /\%\}/ in /home/zz/Documents/blog/_posts/2019-11-24-terminal-time.md
jekyll 3.8.6 | Error:  Liquid syntax error (line 13): Tag '{%' was not properly terminated with regexp: /\%\}/

原因在了下面这段中的%

​```
setopt PROMPT_SUBST
PROMPT='%B%F{yellow}[%D{%H:%M:%S}]%f%F{red}[%n@%m%f:%F{blue}${${(%):-%~}}%f%F{red}]%f$ %b'
TMOUT=1
TRAPALRM() {
	 zle reset-prompt
}
​```

解决办法



 文章索引
 文章标签
 RSS订阅


 邮件订阅



 阅读时间

00:00:00


一言 获取中...