Skip to content

Instantly share code, notes, and snippets.

@AleksejDix
Created October 14, 2016 08:40
Show Gist options
  • Save AleksejDix/7c3d1cfd1bfe6a792015413919759a48 to your computer and use it in GitHub Desktop.
Save AleksejDix/7c3d1cfd1bfe6a792015413919759a48 to your computer and use it in GitHub Desktop.
add figure element with figcaption to markdown
$( document ).ready(function() {
$('.markdown p img').unwrap().wrap('<figure></figure>').after(function() {
return '<figcaption>'+this.alt+'</figcaption>';
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment