Skip to content

Commit

Permalink
Fix dingus link when double clicking Markdown code (#535)
Browse files Browse the repository at this point in the history
Prior to this commit, the link opened is always `/dingus/?text=` (no text),
because `$(this)` is `code.language-markdown`, so `.find`ing `code` in its
descendants turns up nothing.
  • Loading branch information
zmwangx authored and jgm committed Oct 2, 2018
1 parent 0d329a9 commit 04b3fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
});
});
$$("code.language-markdown").dblclick(function(e) { window.open('/dingus/?text=' +
encodeURIComponent($$(this).find('code').text()));
encodeURIComponent($$(this).text()));
});
});
</script>
Expand Down

0 comments on commit 04b3fde

Please sign in to comment.