Skip to content

Commit ab9ebde

Browse files
committed
fix code highlight guess syntax
1 parent 96b8a52 commit ab9ebde

File tree

27 files changed

+77
-74
lines changed

27 files changed

+77
-74
lines changed

content/affiliate.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ outputs = "html"
66
math = true
77
+++
88

9-
```
9+
```text
1010
如果对我推荐的东西感觉不错,请使用下面的链接购买,我会获得一定的返佣,非常感谢。
1111
这种模式在国外称之为Affiliate Network(联盟营销)/ CPS,也就是我们常说的的推广链接。
1212
```

content/dev/guide-to-setup-blog-site-with-zero-cost-1/index.zh-cn.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ isCJKLanguage: true
8383

8484
1. 安装Hugo和Git
8585

86-
```
86+
```bash
8787
brew install hugo
8888
brew install git
8989
```
@@ -92,13 +92,13 @@ brew install git
9292

9393
在 Hugo 官方的[主题站](https://themes.gohugo.io/)我们可以找到大量别人已经开发好的主题皮肤。我们以本博客主题 [Coder](https://themes.gohugo.io/hugo-coder/) 为例:
9494

95-
```
95+
```bash
9696
hugo new site bmpi.dev
9797
```
9898

9999
执行这个命令后我们得到了这些文件:
100100

101-
```
101+
```text
102102
.
103103
├── archetypes
104104
│   └── default.md
@@ -116,7 +116,7 @@ hugo new site bmpi.dev
116116

117117
然后开始添加主题:
118118

119-
```
119+
```bash
120120
cd bmpi.dev
121121
git init
122122
git submodule add https://github.com/luizdepra/hugo-coder.git themes/hugo-coder
@@ -135,13 +135,13 @@ theme = "hugo-coder"
135135

136136
复制一些主题样本数据:
137137

138-
```
138+
```bash
139139
cp -R themes/hugo-coder/exampleSite/ .
140140
```
141141

142142
启动!
143143

144-
```
144+
```bash
145145
hugo server
146146
```
147147

@@ -165,7 +165,7 @@ GitHub 目前已经从代码存放库进化到了无所不包,有人在里面
165165

166166
接下来让我们把上一步创建的网站数据通过 Git 上传到 GitHub 托管。
167167

168-
```
168+
```bash
169169
git add .
170170
git commit -m "first commit"
171171
git remote add origin https://github.com/bmpi-dev/test.bmpi.dev.git
@@ -176,7 +176,7 @@ git push -u origin master
176176

177177
至此,我们已经将网站上传到了 GitHub 。如果之后你要新增文章后上传也只需要执行:
178178

179-
```
179+
```bash
180180
git add .
181181
git commit -m "update"
182182
git push
@@ -303,7 +303,7 @@ theme = "hugo-coder"
303303

304304
对于商业产品用户都是国内的话那必须要备案,备案后你也可以使用国内的云服务和 CDN 了,这样网站在国内的加载速度也会很快。
305305

306-
```
306+
```text
307307
最初,
308308
没有人在意这场灾难,
309309
这不过是一场山火,

content/dev/guide-to-mining/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ og_image: "https://img.bmpi.dev/d0286afd-989a-0500-0aca-c91bee9893d2.png"
1313
此文有更新,见我这条推文系列: https://twitter.com/madawei2699/status/1391410996644769796
1414
{{% /notice %}}
1515

16-
```
16+
```text
1717
股市是人性的放大器,币圈是人性的修罗场
1818
```
1919

content/dev/guide-to-serverless/index.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ CMD [ "python", "./main.py" ]
196196

197197
需要先获取 Tushare 的 API Token 后,在本地运行 Docker:
198198

199-
```
199+
```bash
200200
docker build -t invest-alchemy/core . # 构建
201201
docker run -t -i -e TUSHARE_API_TOKEN=xxxx invest-alchemy/core # 本地运行
202202
```
@@ -237,7 +237,7 @@ docker push replace_with_your_ecr_addr.dkr.ecr.us-east-1.amazonaws.com/invest-al
237237

238238
##### IAM
239239

240-
```
240+
```yaml
241241
######################### Role used by the container regulates what AWS services the task has access to, e.g. your application is using a DynamoDB, then the task role must give the task access to Dynamo.
242242
resource "aws_iam_role" "ecs_service_role" {
243243
name = "${var.project}_ecs_service_role_${var.env}"

content/dev/parser_black_magic/index.zh-cn.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ void do_awesome_stuff(int a, string b) {
5050
/* Code here */
5151
}
5252
```
53+
5354
Token化为:
54-
```
55+
56+
```text
5557
TYPE: void
5658
IDENTIFIER: do_awesome_stuff
5759
OPEN_BRACKET: (
@@ -140,7 +142,7 @@ jison到底有多强,可以从这里感受下: [ProjectsUsingJison](https://gi
140142

141143
todo文件是一种类似yaml/python缩进风格的纯文本格式的文件,如下:
142144

143-
```
145+
```text
144146
test1:
145147
☐ test list1 @started(19-12-11 21:16)
146148
> test list1 comm
@@ -257,7 +259,8 @@ lexer.addRule(/$/gm, function() {
257259
```
258260

259261
Token化的核心是使用特殊的Token替代被Token化文件中的符合正则表达式的字符串,我们这里只关注缩进INDENT/DEDENT和Todo待办事项的NAME,还有文件结束符EOF,所以你可以猜到最终被lexer输出的是个Token List:
260-
```
262+
263+
```text
261264
NAME: test1:
262265
INDENT
263266
NAME: ☐ test list1 @started(19-12-11 21:16)
@@ -279,7 +282,7 @@ EOF
279282

280283
有了上述Token List做输入给jison做BNF语法分析,最终解析出json AST。先看BNF语法:
281284

282-
```
285+
```json
283286
{
284287
'bnf': {
285288
'todo-plus': [
@@ -333,7 +336,7 @@ module.exports = function render(doingJson, criticalJson) {
333336
};
334337
```
335338

336-
```
339+
```html
337340
<ul class='todos' style='margin: 10px 0;'>
338341
{{#todo}}
339342
<li class='todo' style='list-style-type: none;'> {{ name }} </li>

content/dev/vscode-on-cloud/index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Cloud IDE represents the future of an R&D model. The possible development trends
143143

144144
In a nutshell.
145145

146-
```
146+
```text
147147
Cloud IDE, Coding Anytime Anywhere.
148148
```
149149

content/dev/vscode-on-cloud/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ pulumi up # 使用 Pulumi 设置 AWS EC2
171171

172172
一句话总结就是:
173173

174-
```
174+
```text
175175
Cloud IDE, Coding Anytime Anywhere.
176176
```
177177

content/dev/what-is-internet-advertising/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ isCJKLanguage: true
182182

183183
> 这部分只是简单介绍普通人如何快速知道一个网站或者一个视频的广告收入大概是多少钱,而不是专业的分析ROI之类的东西。
184184
185-
```
185+
```text
186186
广告收入 = CPM/C/V/S/I * 展示/点击/播放/购买/安装量
187187
```
188188

content/dev/what-is-seo/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ sitemap相当于站点地图,当然一般网站也会有html版本的站点地
195195

196196
如下是我曾做过的一个站点的robots.txt:
197197

198-
```
198+
```text
199199
User-agent: *
200200
Disallow: /search
201201
Disallow: /search/

content/dev/what-markdown-can-do/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Markdown由 John Gruber 于 2004 年创立,它是一种纯文本标记语言
3434

3535
上述思维导图使用VSCode插件[`PlantUML`](https://plantuml.com/zh/)[^2]预览纯文本生成的,纯文本如下:
3636

37-
```
37+
```text
3838
@startmindmap
3939
skinparam monochrome true
4040
* Markdown排版

0 commit comments

Comments
 (0)