Last active
September 29, 2016 08:14
-
-
Save jpwilliams/61e1dd5d0acb50e29bb8c632ff05de2d to your computer and use it in GitHub Desktop.
Simple Markdown Single Regex
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
// Very simple regex that supports ```big code blocks```, | |
// `code highlights`, *bold*, _italic_ and ~strikethrough~, | |
// isolating each group. | |
/(`{3}([\S\s]+?)`{3})|(`(.+?)`)|(\*(.+?)\*)|(_(.+?)_)|(~(.+?)~)|(\n)|(.+?)/gm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment