mirror of
https://github.com/remarkjs/remark-lint.git
synced 2024-10-05 15:49:09 +03:00
maximum-line-length: fix long links
Closes GH-318. Closes GH-319.
This commit is contained in:
parent
6b6ea9caad
commit
159d92758e
@ -60,6 +60,10 @@
|
||||
*
|
||||
* <div>Mercury mercury mercury mercury mercury mercury mercury mercury mercury</div>
|
||||
*
|
||||
* Mercury
|
||||
* <http://localhost/mercury/mercury/mercury/mercury/mercury/mercury/mercury/mercury>
|
||||
* mercury mercury.
|
||||
*
|
||||
* [foo]: http://localhost/mercury/mercury/mercury/mercury/mercury/mercury/mercury/mercury
|
||||
*
|
||||
* @example
|
||||
@ -238,12 +242,15 @@ const remarkLintMaximumLineLength = lintRule(
|
||||
|
||||
const next = parent.children[index + 1]
|
||||
const nextStart = pointStart(next)
|
||||
const nextEnd = pointEnd(next)
|
||||
|
||||
// Not allowing when there’s a following child.
|
||||
if (
|
||||
next &&
|
||||
nextStart &&
|
||||
nextStart.line === start.line &&
|
||||
nextEnd &&
|
||||
nextEnd.line === start.line &&
|
||||
// Either something with children:
|
||||
(!('value' in next) ||
|
||||
// Or with whitespace:
|
||||
|
@ -165,6 +165,10 @@ Mercury mercury mercury mercury mercury mercury mercury mercury mercury ![mercur
|
||||
|
||||
<div>Mercury mercury mercury mercury mercury mercury mercury mercury mercury</div>
|
||||
|
||||
Mercury
|
||||
<http://localhost/mercury/mercury/mercury/mercury/mercury/mercury/mercury/mercury>
|
||||
mercury mercury.
|
||||
|
||||
[foo]: http://localhost/mercury/mercury/mercury/mercury/mercury/mercury/mercury/mercury
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user