GitBook

gitbook | 排版作文

2016-12-12  本文已影响62人  天边飘过一行字

插件帮不上啥忙,还得改源代码。需求格式:

格式需求

推荐入门教程:GitBook的安装配置

安装

配置

.gitbook\versions\3.2.2\node_modules\gitbook-markdown\node_modules\kramed\lib\rules\block.js

paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def|math))+)\n*/,

修改为:

paragraph: /^((?:[^\n]+?(?!hr|heading|lheading|blockquote|tag|def|math))+)\n*/,

注意我去掉了一个\n

#markdown {
  font-family: SimHei, arial, sans-serif;
  font-size: 24px;
  line-height: 1.5;
}
h1, h2, h3, h4, h5, h6 {
  text-align:center;
}
p{
  text-indent: 2em; 
}

上一篇 下一篇

猜你喜欢

热点阅读