Skip to content

Commit 5bc35d4

Browse files
committed
fixed internal image source property name to allow href attributes for img tags using Maruku dialect
1 parent dca03a0 commit 5bc35d4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/markdown.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ Markdown.dialects.Gruber.inline = {
811811

812812
m[2] == this.dialect.inline.__call__.call( this, m[2], /\\/ )[0];
813813

814-
var attrs = { alt: m[1], href: m[2] || "" };
814+
var attrs = { alt: m[1], src: m[2] || "" };
815815
if ( m[4] !== undefined)
816816
attrs.title = m[4];
817817

@@ -843,7 +843,7 @@ Markdown.dialects.Gruber.inline = {
843843
// Process escapes only
844844
m[2] = this.dialect.inline.__call__.call( this, m[2], /\\/ )[0];
845845

846-
var attrs = { href: m[2] || "" };
846+
var attrs = { src: m[2] || "" };
847847
if ( m[4] !== undefined)
848848
attrs.title = m[4];
849849

@@ -1397,12 +1397,10 @@ function convert_tree_to_html( tree, references, options ) {
13971397
jsonml[ 0 ] = "code";
13981398
break;
13991399
case "img":
1400-
jsonml[ 1 ].src = jsonml[ 1 ].href;
1401-
delete jsonml[ 1 ].href;
14021400
break;
14031401
case "linebreak":
14041402
jsonml[0] = "br";
1405-
break;
1403+
break;
14061404
case "link":
14071405
jsonml[ 0 ] = "a";
14081406
break;

0 commit comments

Comments
 (0)