【问题标题】:Markdown line limit with hyperlink带有超链接的 Markdown 行限制
【发布时间】:2021-11-22 12:43:53
【问题描述】:

我在 markdown 文件中遇到问题,因为它说该行超出了限制。

MD013/line-length Line length [Expected: 80; Actual: 181]

该行是:

Please refer [link](https://github.com/orchestracities/ngsi-timeseries-api/blob/master/docs/manuals/admin/configuration.md#environment-variables) for more info about those variables

如何在不超过80 的限制中添加超链接,因为我无法拆分上面添加的超链接,并且必须在预期长度 80 内得到它。

【问题讨论】:

    标签: markdown lint pep8


    【解决方案1】:

    您可以使用参考样式链接。参考样式链接不受 linter 的行长规则的限制。它们以后也更容易阅读/编辑。

    Please refer [link][1] for more info about those variables 
    
    [1]: https://github.com/orchestracities/ngsi-timeseries-api/blob/master/docs/manuals/admin/configuration.md#environment-variables
    

    【讨论】:

    • 感谢您的回答。请你也让我知道如何将[1]: https://github.com/orchestracities/ngsi-timeseries-api/blob/master/docs/manuals/admin/configuration.md#environment-variables 限制在 79 个字符内……或者任何方式,因为代码 linter 将无法执行此语句。
    • 正如我在回答中提到的,Markdown linter 不应该针对参考链接运行行长。如果是,那么这是 linter 中的错误。
    猜你喜欢
    • 2014-10-20
    • 2022-11-20
    • 1970-01-01
    • 2021-06-09
    • 2021-12-09
    • 2011-01-05
    • 1970-01-01
    • 2016-05-21
    • 2017-04-29
    相关资源
    最近更新 更多