Created
May 9, 2025 09:19
-
-
Save jimworm/14434788b5d0260538a1a8be3f6610eb to your computer and use it in GitHub Desktop.
Escape markdown
This file contains hidden or 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
str.gsub(/[\\\`\*\_\{\}\[\]\<\>\(\)\#\+\-\.\!\|]/) { |c| "\\#{c}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment