Commits

Juha Kuitunen committed 38671a7

bold and italics working correctly in Markdown

  • Participants
  • Parent commits 18d9354

Comments (0)

Files changed (1)

src/com/saibotd/bitbeaker/MarkupHelper.java

 		input = m.markdown(input);
 		//input = getEmailAddressesLinkified(input);
 		//input = getBareUrlsLinkified(input);
+
+		// android.text.Html.fromHtml flips styles of <em> and <strong> and we don't like that
+		input = input.replaceAll("<em>(.+?)</em>", "<i>$1</i>");
+		input = input.replaceAll("<strong>(.+?)</strong>", "<b>$1</b>");
 		return Html.fromHtml(input);
 		//return Html.fromHtml(handleMarkupAsString(input, owner, slug));
 	}