Skip to content

Commit 1f48d59

Browse files
committed
Link fallback to url if linkname not informed
1 parent e897318 commit 1f48d59

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/TextFormatting.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function textFormatting(str) {
3636
} else {
3737
return "";
3838
}
39-
} else if (linkName) {
40-
return `<a href='${linkUrl}'>${linkName}</a>`;
39+
} else if (linkUrl) {
40+
return `<a href='${linkUrl}'>${linkName || linkUrl}</a>`;
4141
} else if (imgAlt) {
4242
return `<img src='${imgPath}' alt='${imgAlt}'/>`;
4343
} else if (code) {

0 commit comments

Comments
 (0)