带有长线的 Markdown 表

标签 markdown octopress

我正在使用 Markdown 来创建一个表。我的描述列包含很长的文本,因此当我换行时它在 Markdown 文件上看起来很糟糕:

Argument            | Description |
--------            | ----------- |
appDir              | The top level directory that contains your app. If this
option is used then it assumed your scripts are in |a subdirectory under this path. This option is not required. If it is not specified, then baseUrl below is the anchor point for finding things. If this option is specified, then all the files from the app directory will be copied to the dir: output area, and baseUrl will assume to be a relative path under this directory.  
baseUrl             | By default, all modules are located relative to this path. If baseUrl is not explicitly set, then all modules are loaded relative to the directory that holds the build file. If appDir is set, then baseUrl should be specified as relative to the appDir.
dir                 | The directory path to save the output. If not specified, then the path will default to be a directory called "build" as a sibling to the build file. All relative paths are relative to the build file. 
modules             | List the modules that will be optimized. All their immediate and deep dependencies will be included in the module's file when the build is done. If that module or any of its dependencies includes i18n bundles, only the root bundles will be included unless the locale: section is set above. 

我想换行,因为它对我来说更具可读性。
有没有办法让表格对编辑器更具可读性?

最佳答案

还有另一种选择。由于哲学认为 Markdown 应该是轻量级的,而不是标记语言,并且旨在供人类自然消费(与 SGML/HTML 样式格式相比),我相信在特殊情况下回退到 ASCII 艺术是很好和自然的.

对于这个特殊的任务,角色艺术是很自然的。因此,只需将表格缩进四个空格,将其格式化以提高可读性,Markdown 只会将其视为预先格式化的文本,双方就可以停止相互争斗。

例如:

|  Sequence   | Result                                                        |
|-------------|---------------------------------------------------------------|
| `a?c`       | Matches `abc`, `axc`, and `aac`. Does not match `ac`, `abbc`, | 
|             | or `a/c`.                                                     |
|-------------|---------------------------------------------------------------|
| `a*c`       | Matches "ac", "abc" and "azzzzzzzc". Does not match "a/c".    |
|-------------|---------------------------------------------------------------|
| `foo...bar` | Matches "foobar", "fooxbar", and "fooz/blaz/rebar". Does not  |
|             | match "fo/obar", "fobar" or "food/bark".                      |
|-------------|---------------------------------------------------------------|
| `....obj`   | Matches all files anywhere in the current hierarchy that end  |
|             | in ".obj". Note that the first three periods are interpreted  |
|             | as "...", and the fourth one is interpreted as a literal "."  |
|             | character.                                                    |
|-------------|---------------------------------------------------------------|

... 并做了。

关于带有长线的 Markdown 表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15955160/

相关文章:

html - 如何在 github-pages 上的 mkdocs 生成的网站中嵌入本地 pdf 文件?

Javascript:将动态文本添加到 Markdown

javascript - 如何统计我的 Octopress 博客的浏览量?

markdown - Octopress Markdown 中的换行与新段落

macos - Octopress 运行 rake 预览失败

javascript - 简单编辑器

javascript - 将 Markdown 解析委托(delegate)给客户端有什么缺点?

ruby - 从 Jekyll 插件向页面添加属性

ruby - 启动服务器时出现 Jekyll 错误

r - 如何在rmarkdown2中为HTML和PDF输出编写度数符号?