Last active
August 29, 2015 14:22
-
-
Save GingerBear/fcec254d414d7134dfe4 to your computer and use it in GitHub Desktop.
convert table tag to div
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
function tableToDiv(html) { | |
return html.replace(/<(\/?)(table|thead|tbody|tfoot|th|td|tr)/gi, '<$1div data-original-tag="$2"'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment