Skip to content

Commit

Permalink
Escaping backslash character if not followed by any of "\rnt" in diag…
Browse files Browse the repository at this point in the history
…ram code
  • Loading branch information
kmierzeje committed Oct 23, 2024
1 parent 4480d0e commit ef1d584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vba/PlantUml.bas
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ Function StringToHex(Text As String) As String
Dim chars() As Byte
chars = ToUTF8(Text)
For i = LBound(chars) To UBound(chars)
If chars(i) = Asc("\") Then
If InStr("\rnt", Chr(chars(i + 1))) = 0 Then out = out + "5C"
End If
Dim ch As String
ch = Hex(chars(i))
If Len(ch) = 1 Then
Expand Down

0 comments on commit ef1d584

Please sign in to comment.