Print imageReference with no alt in Markdown (#3643)
parent
7d3a30615b
commit
157df6e3fd
|
@ -284,7 +284,7 @@ function genericPrint(path, options, print) {
|
||||||
case "imageReference":
|
case "imageReference":
|
||||||
switch (node.referenceType) {
|
switch (node.referenceType) {
|
||||||
case "full":
|
case "full":
|
||||||
return concat(["![", node.alt, "][", node.identifier, "]"]);
|
return concat(["![", node.alt || "", "][", node.identifier, "]"]);
|
||||||
default:
|
default:
|
||||||
return concat([
|
return concat([
|
||||||
"![",
|
"![",
|
||||||
|
|
|
@ -14,6 +14,13 @@ exports[`full.md 1`] = `
|
||||||
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`full-no-alt.md 1`] = `
|
||||||
|
![][world]
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
![][world]
|
||||||
|
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`shortcut.md 1`] = `
|
exports[`shortcut.md 1`] = `
|
||||||
![hello]
|
![hello]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
![][world]
|
Loading…
Reference in New Issue