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

表の列幅の指定への対応 #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

piroor
Copy link
Contributor

@piroor piroor commented Feb 14, 2020

Re:VIEWの仕様上は列幅の指定ができる https://github.com/kmuto/review/blob/master/doc/format.ja.md#%E8%A1%A8%E3%81%AE%E5%88%97%E5%B9%85 のですが、現行版では列幅の情報を与える方法がありません。
GFMの仕様上も列幅に関する使用は無い模様でしたので、試験的に、独自の記法で列幅を指定できるようにしてみました。

|@10: あああ |@20: いいい |@30: ううう |
| --- | --- | --- |
| あああ | いいい | ううう |

このように「@数値:」をヘッダ行の各セルの先頭に書くと、数値をその列の幅(mm)として採用する、という仕様にしています。

自分はMarkdown、Re:VIEWのいずれについても素人のため、この記法が妥当かどうかについて判断材料を持っていない状態です。
どう思われますでしょうか?

@erukiti
Copy link
Owner

erukiti commented Feb 15, 2020

記法をどうするかは悩ましいところですねー。

ほんとは、テーブルキャプションなんかも付けたいんですけどね

@piroor
Copy link
Contributor Author

piroor commented Feb 15, 2020

拡張性を考えると、コードブロックの方と同様に {width=30}表記の方が妥当な気がしてきました。
そのように変えてみようと思います。

@piroor
Copy link
Contributor Author

piroor commented Feb 15, 2020

書式を変更しました。以下のように書けるようにしてみました。

|{width=10} あああ |{width=20} いいい |{width=30} ううう |
| --- | --- | --- |
| あああ | いいい | ううう |

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

2 participants