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

章参照への対応 #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

piroor
Copy link
Contributor

@piroor piroor commented Apr 3, 2020

https://github.com/kmuto/review/blob/master/doc/format.ja.md#%E8%A6%8B%E5%87%BA%E3%81%97%E5%8F%82%E7%85%A7 の仕様のうち、章への参照に対応する変更です。
特殊な記法を導入するのではなく、Markdownとしての原稿上で自然に書くであろうリンク文字列に基づいて、以下のように参照の形式を推測する仕様としてみました。

  • リンク先が同階層のmdまたはreファイルであれば、章への参照と見なす。
  • リンク文字列が「第N章」のように章番号であれば、章番号の参照と見なす。
  • リンク文字列が「第N章 何々」のように章番号+任意のテキストであれば、章番号+章タイトルの参照と見なす。
  • それ以外の場合、章タイトルの参照と見なす。

いかがでしょうか?

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

Successfully merging this pull request may close these issues.

None yet

1 participant