-
-
Save hskang9/60ae967250b68a55e5272e0f881ef104 to your computer and use it in GitHub Desktop.
add figure element with figcaption to markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( 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