Skip to content

Commit eea81ea

Browse files
authored
Merge pull request ember-learn#240 from 22a/master
Omit <a> title attribute if title is null
2 parents f9ded5c + b752477 commit eea81ea

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lib/utils/compile-markdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class HBSRenderer extends marked.Renderer {
122122
}
123123

124124
link(href, title, text) {
125-
return `<a href="${href}" title="${title}" class="docs-md__a">${text}</a>`;
125+
const titleAttribute = title ? `title="${title}"` : '';
126+
return `<a href="${href}" ${titleAttribute} class="docs-md__a">${text}</a>`;
126127
}
127128
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"liquid-fire": "^0.29.1",
6969
"lodash": "^4.17.5",
7070
"lunr": "^2.1.5",
71-
"marked": "^0.3.12",
71+
"marked": "^0.5.0",
7272
"parse-git-config": "^1.1.1",
7373
"quick-temp": "^0.1.8",
7474
"resolve": "^1.5.0",

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6332,9 +6332,9 @@ [email protected]:
63326332
version "0.3.6"
63336333
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7"
63346334

6335-
marked@^0.3.12:
6336-
version "0.3.16"
6337-
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.16.tgz#2f188b7dfcfa6540fe9940adaf0f3b791c9a5cba"
6335+
marked@^0.5.0:
6336+
version "0.5.0"
6337+
resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.0.tgz#9e590bad31584a48ff405b33ab1c0dd25172288e"
63386338

63396339
match-media@^0.2.0:
63406340
version "0.2.0"

0 commit comments

Comments
 (0)