嵌套列表格式不正确

最大取胜者

我有以下 Markdown 片段,可以在 Github 上看到:

1. Ask a supervisor for a `cmprod.pem` file and move it into the `~/.ssh` folder.
2. Run `chmod 600 ~/.ssh/cmprod.pem`
3. Run `eb ssh` and type `yes` when it asks if you would like to add the key to your keychain.
4. Once connected via SSH, to access the application's source code, perform the following steps
    - `sudo docker ps`
    - Copy the desired value from the `CONTAINER ID` column
    - Run `sudo docker exec -it $CONTAINER_ID rails c` using the copied value.

问题是嵌套列表(步骤 4 下的三个要点)格式不正确。他们最终看起来像这样:

  1. 向主管索要cmprod.pem文件并将其移动到~/.ssh文件夹中。
  2. 跑步 chmod 600 ~/.ssh/cmprod.pem
  3. 当它询问您是否要将钥匙添加到钥匙串时运行eb ssh并键入yes
  4. 通过 SSH 连接后,要访问应用程序的源代码,请执行以下步骤 - sudo docker ps    - 从CONTAINER ID列中 复制所需的值
    • sudo docker exec -it $CONTAINER_ID rails c使用复制的值运行
韦兰

这取决于您使用的规则集。根据GitHub 使用的Commonmark(由于 [github] 标签,我假设这里是相关的),“一个列表可以中断一个段落。也就是说,不需要空行来将一个段落与以下列表分开。 ” 实施例280的规格即使示出了示例类似你。如果它不适合您使用 Commonmark 解析器,那么这将是一个错误。

但是,如果您不使用 Commonmark(或作为任何 Commonmark 错误的解决方法),则 Markdown 规则要求您在列表和前一段之间有一个空行。由于父列表的第 4 项中的文本将是一个段落(在列表项内),因此该段落和该段落之后的子列表项之间需要有一个空行。像这样:

1. Ask a supervisor for a `cmprod.pem` file and move it into the `~/.ssh` folder.
2. Run `chmod 600 ~/.ssh/cmprod.pem`
3. Run `eb ssh` and type `yes` when it asks if you would like to add the key to your keychain.
4. Once connected via SSH, to access the application's source code, perform the following steps

    - `sudo docker ps`
    - Copy the desired value from the `CONTAINER ID` column
    - Run `sudo docker exec -it $CONTAINER_ID rails c` using the copied value.

记住,在嵌套列表项时,您需要遵循与列表之外相同的所有规则,这会很有帮助。然后缩进一级。因此,例如,嵌套在第 4 项中的所有内容在列表项之外都将如下所示:

Once connected via SSH, to access the application's source code, perform the following steps

- `sudo docker ps`
- Copy the desired value from the `CONTAINER ID` column
- Run `sudo docker exec -it $CONTAINER_ID rails c` using the copied value.

段落和列表之间需要一个空行。因此,当将所有内容嵌套在列表中时,您需要保持相同的格式并保持空行。仅仅因为第一行在项目符号(或列表编号)之后开始并不意味着它不遵循相同的规则。

最后,即使您使用的是 Commonmark 解析器,我还是建议您使用空行。这是任何 Markdown linter 都会建议的好形式。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章