Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ブロックコードとコメントアウト #13

Closed
KeenS opened this issue Jan 27, 2016 · 10 comments
Closed

ブロックコードとコメントアウト #13

KeenS opened this issue Jan 27, 2016 · 10 comments
Assignees
Milestone

Comments

@KeenS
Copy link
Member

KeenS commented Jan 27, 2016

ブロックコードをコメントアウトするのがどうもgitbookと相性良くないようです。今のところブロックコードはコメントアウトせず削除することで対応しています。

幸い、コード中に出てくるコメントの分量はそこまで多くないので大丈夫ですが、いずれは対応を考える必要があります。

@Nnwww
Copy link
Contributor

Nnwww commented Jan 27, 2016

ではPRを投げる側でコードブロックを削除しておいた方が良いですか?

@KeenS
Copy link
Member Author

KeenS commented Jan 27, 2016

はい。おねがいします。他に良い方法(コメント部分だけ抽出してコメントアウトしておくとか)があるならその方がいいのですがとりあえずは削除ということでお願いします。

@yohhoy
Copy link
Contributor

yohhoy commented Jan 27, 2016

ブロックコードのコメントアウトとは、具体的にどのような記述でしょうか?下記のようなもの?

<!-- Is this `block code`? -->

@KeenS
Copy link
Member Author

KeenS commented Jan 27, 2016

それは問題ないです。バッククォートを3つ使った別行立ての方です。

<!-- ```
   this is the block code
  ``` -->

@KeenS
Copy link
Member Author

KeenS commented Jan 31, 2016

#28 にてそれっぽい解決策発見。

# // let x = "foo" // this is a commet
let x = "foo" // これはコメントです。

のようにするとHTMLの表示上は原文は見えない。

@Nnwww @yohhoy @tatsuya6502 @ykomatsu @dalance
この方式でどうでしょうか。

@ykomatsu
Copy link
Contributor

「Documentation as tests」で使われている方法ですね。
いいと思います。

@Nnwww
Copy link
Contributor

Nnwww commented Jan 31, 2016

良いと思います。

@tatsuya6502
Copy link
Member

#13 (comment)

# // let x = "foo" // this is a commet
let x = "foo" // これはコメントです。

この方式でどうでしょうか

試してみました。

  • rustbook で生成した HTML → 英文が表示されない
  • play.rust-lang.org のコードエディタ → 英文も和文もコードコメントとして表示される

いいですね。この方法に賛成します。

@KeenS
Copy link
Member Author

KeenS commented Feb 1, 2016

ありがとうございます。既存のものの変換とCONTRIBUTINGの変更しますね。

@KeenS
Copy link
Member Author

KeenS commented Feb 14, 2016

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants