markdownlint/test/spaces_inside_link_text.md

53 lines
1,003 B
Markdown
Raw Normal View History

# Spaces Inside Link Text
[](http://bar/)
[foo](https://bar/)
2015-04-15 18:24:42 -07:00
["foo"](https://bar/)
[`foo`](https://bar/)
[*foo*](https://bar/)
[**foo**](https://bar/)
[foo "bar"](https://baz/)
[ ](https://bar/) {MD039}
[foo ](https://bar/) {MD039}
2015-04-15 18:24:42 -07:00
[ foo](https://bar/) {MD039}
2015-04-15 18:24:42 -07:00
[ foo ](https://bar/) {MD039}
2015-04-15 18:24:42 -07:00
[ "foo" ](https://bar/) {MD039}
[ `foo` ](https://bar/) {MD039}
[ *foo* ](https://bar/) {MD039}
2015-04-15 18:24:42 -07:00
The following shouldn't break anything:
[![Screenshot.png](/images/Screenshot.png)](/images/Screenshot.png)
function CodeButNotCode(input) {
return input.replace(/[- ]([a-z])/g, "one"); // {MD039}
}
function MoreCodeButNotCode(input) {
input = input.replace(/[- ]([a-z])/g, "two"); // {MD039}
input = input.toLowerCase();
input = input.replace(/[- ]([a-z])/g, "three"); // {MD039}
return input;
}
[Links](ending)
[with](spaces)
[error ]({MD039})
Wrapped [ link with leading space
](https://example.com) {MD039}
Non-wrapped [ link with leading space](https://example.com) {MD039}