diff --git a/mode/markdown/markdown.js b/mode/markdown/markdown.js
index 0408e8260ea6abc73ac25ea76f7e51eb1f53b9e8..bef37b8ab6ac79d7e409208da86bd6d231f4d251 100644
--- a/mode/markdown/markdown.js
+++ b/mode/markdown/markdown.js
@@ -274,16 +274,15 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
 
     if (state.linkHref) {
       styles.push(linkhref, "url");
-      return styles.length ? styles.join(' ') : null;
-    }
+    } else { // Only apply inline styles to non-url text
+      if (state.strong) { styles.push(strong); }
+      if (state.em) { styles.push(em); }
+      if (state.strikethrough) { styles.push(strikethrough); }
 
-    if (state.strong) { styles.push(strong); }
-    if (state.em) { styles.push(em); }
-    if (state.strikethrough) { styles.push(strikethrough); }
+      if (state.linkText) { styles.push(linktext); }
 
-    if (state.linkText) { styles.push(linktext); }
-
-    if (state.code) { styles.push(code); }
+      if (state.code) { styles.push(code); }
+    }
 
     if (state.header) { styles.push(header); styles.push(header + "-" + state.header); }