Skip to content

fix(markdown): no break on link#3204

Merged
azz merged 2 commits intoprettier:masterfrom
ikatyang:fix/markdown-link-url-head
Nov 8, 2017
Merged

fix(markdown): no break on link#3204
azz merged 2 commits intoprettier:masterfrom
ikatyang:fix/markdown-link-url-head

Conversation

@ikatyang
Copy link
Copy Markdown
Member

@ikatyang ikatyang commented Nov 8, 2017

Fixes #3203

Linters have two categories of rules:

**Formatting rules**: eg: [max-len](http://eslint.org/docs/rules/max-len),
[no-mixed-spaces-and-tabs](http://eslint.org/docs/rules/no-mixed-spaces-and-tabs),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look better before

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should we only break url head if the [no-mixed-spaces-and-tabs] is breakable?

https://codecov.io/gh/prettier/prettier) [![NPM version](
https://img.shields.io/npm/v/prettier.svg)](
https://www.npmjs.com/package/prettier) [![styled with prettier](
https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](#badge)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These looks weird but since multi-image is not common and it can be simply achieved by <!-- prettier-ignore -->, should not be a problem.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very common for badge lists

@ikatyang ikatyang changed the title fix(markdown): link/image url head is breakable fix(markdown): no break on link Nov 8, 2017
Copy link
Copy Markdown
Member

@azz azz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so much better to me!

@azz azz merged commit 7fb8e3f into prettier:master Nov 8, 2017
azz added a commit that referenced this pull request Nov 8, 2017
@ikatyang ikatyang deleted the fix/markdown-link-url-head branch November 8, 2017 22:39
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 19, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants