Print imageReference with no alt in Markdown (#3643)
This commit is contained in:
1 parent
7d3a30615b
commit
157df6e3fd
3 files changed
+9
-1
No files matched your search
@@ -284,7 +284,7 @@ function genericPrint(path, options, print) {
|
||||
case "imageReference":
|
||||
switch (node.referenceType) {
|
||||
case "full":
|
||||
return concat(["![", node.alt, "][", node.identifier, "]"]);
|
||||
return concat(["![", node.alt || "", "][", node.identifier, "]"]);
|
||||
default:
|
||||
return concat([
|
||||
"![",
|
||||
|
||||
@@ -14,6 +14,13 @@ exports[`full.md 1`] = `
|
||||
|
||||
`;
|
||||
|
||||
exports[`full-no-alt.md 1`] = `
|
||||
![][world]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
![][world]
|
||||
|
||||
`;
|
||||
|
||||
exports[`shortcut.md 1`] = `
|
||||
![hello]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
![][world]
|
||||
Reference in new issue
Block a user