Skip to content

Commit 00b451a

Browse files
forkialfonsogarciacaro
authored andcommitted
cleanup
1 parent 8bffd10 commit 00b451a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/Fable.React/Fable.Helpers.ReactServer.fs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@ let escapeHtml (sb:StringBuilder) (str: string) =
1919
let mutable charIndex = -1
2020
for i = 0 to splits.Length - 2 do
2121
let part = splits.[i]
22-
sb.Append(part) |> ignore
22+
sb.Append part |> ignore
2323
charIndex <- charIndex + part.Length + 1
2424
let char = str.[charIndex]
25-
ignore (
26-
match char with
27-
| '"' -> sb.Append("&quot")
28-
| '&' -> sb.Append("&amp;")
29-
| ''' -> sb.Append("&#x27;") // modified from escape-html; used to be '&#39'
30-
| '<' -> sb.Append("&lt;")
31-
| '>' -> sb.Append("&gt;")
32-
| c -> sb.Append(c)
33-
)
25+
match char with
26+
| '"' -> sb.Append("&quot")
27+
| '&' -> sb.Append("&amp;")
28+
| ''' -> sb.Append("&#x27;") // modified from escape-html; used to be '&#39'
29+
| '<' -> sb.Append("&lt;")
30+
| '>' -> sb.Append("&gt;")
31+
| c -> sb.Append(c)
32+
|> ignore
3433
sb.Append(Array.last splits) |> ignore
3534

3635
let inline private addUnit (html:StringBuilder) (key: string) (value: string) =
@@ -464,7 +463,7 @@ let private renderCssProp (html:StringBuilder) (prop: CSSProp) =
464463

465464
let inline boolAttr (html:StringBuilder) (key: string) (value: bool) = if value then html.Append key |> ignore
466465

467-
let inline strAttr (html:StringBuilder) (key: string) (value: string) =
466+
let inline strAttr (html:StringBuilder) (key: string) (value: string) =
468467
html.Append key |> ignore
469468
html.Append "=\"" |> ignore
470469
escapeHtml html value

0 commit comments

Comments
 (0)