Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Fix rendering of zh-CN #541

Merged
merged 1 commit into from
Sep 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions _includes/zh-CN/example.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// ��������ǿ��Ա༭�����ܹ����е�
// 这个代码是可以编辑并且能够运行的
fn main() {
// һ�����׼�����
// `+` �� `-` ��ζ�żӼ�1
// `*` �� `/` ��ζ�ų˳�2
// 一个简易计算器
// `+` `-` 意味着加减1
// `*` `/` 意味着乘除2

let program = "+ + * - /";
let mut accumulator = 0;
Expand All @@ -13,10 +13,10 @@ fn main() {
'-' => accumulator -= 1,
'*' => accumulator *= 2,
'/' => accumulator /= 2,
_ => { /* �������� */ }
_ => { /* 忽略其他 */ }
}
}

println!("���� \"{}\" �Ľ���� {}",
println!("程序 \"{}\" 的结果是 {}",
program, accumulator);
}
10 changes: 5 additions & 5 deletions _includes/zh-CN/example.rs.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<pre class='rust'>
<span class='kw'>fn</span> main() {
<span class='comment'>// һ�����׼�����
// `+` �� `-` ��ζ�żӼ�1
// `*` �� `/` ��ζ�ų˳�2</span>
<span class='comment'>// 一个简易计算器
// `+` `-` 意味着加减1
// `*` `/` 意味着乘除2</span>

<span class='kw'>let</span> program = <span class='string'>"+ + * - /"</span>;
<span class='kw'>let</span> <span class='kw'>mut</span> accumulator = <span class='number'>0</span>;
Expand All @@ -13,11 +13,11 @@
<span class='string'>'-'</span> => accumulator <span class='op'>-=</span> <span class='number'>1</span>,
<span class='string'>'*'</span> => accumulator <span class='op'>*=</span> <span class='number'>2</span>,
<span class='string'>'/'</span> => accumulator <span class='op'>/=</span> <span class='number'>2</span>,
_ => { <span class='comment'>/* �������� */</span> }
_ => { <span class='comment'>/* 忽略其他 */</span> }
}
}

<span class='prelude-val'>println!</span>(<span class='string'>"���� \"{}\" �Ľ���� {}"</span>,
<span class='prelude-val'>println!</span>(<span class='string'>"程序 \"{}\" 的结果是 {}"</span>,
program, accumulator);
}
</pre>
2 changes: 1 addition & 1 deletion zh-CN/downloads.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
layout: zh-CN/default
title: 下载 &middot; Rust程序语言
---
Expand Down
2 changes: 1 addition & 1 deletion zh-CN/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
---
layout: zh-CN/basic
title: Rust程序语言
---
Expand Down