duo-labs / duo-labs/markflow

Long inline links reflowing is problematic

Open
#64 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
21
Forks
4
PR merge metrics
No merged PRs in 30d

Description

If an inline link is too long, it might get reflowed in a suboptimal way. It happens when you have a line that looks like:
```markdown
Some text with [a link](https://example.org/some-very-looooooooooooooooooooooooooooooooooooooooooooooooooong-link.html)
```
This gets reflowed like so:
```markdown
Some text with [a link](
https://example.org/some-very-looooooooooooooooooooooooooooooooooooooooooooooooooong-link.html)
```
Some Markdown converters (like libtext-markdown-perl) don't like this, and will generate this HTML:
```html

Some text with [a link](
https://example.org/some-very-looooooooooooooooooooooooooooooooooooooooooooooooooong-link.html)


```
I think the way it is reflowed is valid CommonMark, but it would be nicer for some tools, and arguably as well for a human reader, if the above example would be reflowed as:
```markdown
Some text with
[a link](https://example.org/some-very-looooooooooooooooooooooooooooooooooooooooooooooooooong-link.html)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.