aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/writers/markdown-writer.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/writers/markdown-writer.js b/lib/writers/markdown-writer.js
index 5908e3b..268b8fb 100644
--- a/lib/writers/markdown-writer.js
+++ b/lib/writers/markdown-writer.js
@@ -13,11 +13,15 @@ function markdownElement(start, end) {
function markdownLink(attributes) {
var href = attributes.href || "";
- return {
- start: "[",
- end: "](" + href + ")",
- anchorPosition: "before"
- };
+ if (href) {
+ return {
+ start: "[",
+ end: "](" + href + ")",
+ anchorPosition: "before"
+ };
+ } else {
+ return {};
+ }
}
function markdownImage(attributes) {