Guest User

Untitled

a guest
Jan 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.81 KB | None | 0 0
  1.     Private Function NormalizeCode(ByVal code As String) As String
  2.         'Replace font
  3.         Dim step1 As String = code '.Replace("monospace", """Courier New""")
  4.         'Build a string of style
  5.         Dim style As String = "</style>"
  6.         style &= "<font color=""" & Drawing.ColorTranslator.ToHtml(My.Settings.FontColor) & """ "
  7.         style &= "size=""" & My.Settings.FontSize & """><div dir=""ltr"" "
  8.         Dim step2 As String = step1.Replace("</style><div ", style)
  9.         Dim step3 As String = step2.Replace("</ol></div>", "</ol></div></font>")
  10.         Dim step4 As String = step3.Replace("<ol>", String.Empty).Replace("</ol>", String.Empty)
  11.         Dim step5 As String = step4.Replace("<li class", "<div font-face=""courier new"" class").Replace("</li>", "</div>")
  12.         Return step5
  13.     End Function
Add Comment
Please, Sign In to add comment