diff --git a/src/subParsers/italicsAndBold.js b/src/subParsers/italicsAndBold.js
index 19d95e39..4a2fa4dd 100644
--- a/src/subParsers/italicsAndBold.js
+++ b/src/subParsers/italicsAndBold.js
@@ -4,8 +4,8 @@ showdown.subParser('italicsAndBold', function (text, options) {
if (options.literalMidWordUnderscores) {
//underscores
// Since we are consuming a \s character, we need to add it
- text = text.replace(/(^|\s)__(?=\S)([^]+?)__(?=\s|$)/gm, '$1$2');
- text = text.replace(/(^|\s)_(?=\S)([^]+?)_(?=\s|$)/gm, '$1$2');
+ text = text.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm, '$1$2');
+ text = text.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm, '$1$2');
//asterisks
text = text.replace(/\*\*(?=\S)([^]+?)\*\*/g, '$1');
text = text.replace(/\*(?=\S)([^]+?)\*/g, '$1');