File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,3 @@ let pageNotFound =
1111 [ Container.container [ Container.Modifiers [ Modifier.TextAlignment( Screen.All, TextAlignment.Centered) ] ]
1212 [ Heading.h1 [ ]
1313 [ str " 404" ] ] ] ]
14-
15- let converter = Showdown.Globals.Converter.Create()
16-
17- type DangerousInnerHtml =
18- { __html : string }
19-
20- let contentFromMarkdown options str =
21- Content.content
22- [ yield ! options
23- yield Content.Props [ DangerouslySetInnerHTML { __ html = converter.makeHtml str } ] ]
24- [ ]
Original file line number Diff line number Diff line change @@ -8,6 +8,17 @@ open Fable.FontAwesome
88open Fable.FontAwesome .Free
99open System
1010
11+ let converter = Showdown.Globals.Converter.Create()
12+
13+ type DangerousInnerHtml =
14+ { __html : string }
15+
16+ let contentFromMarkdown options str =
17+ Content.content
18+ [ yield ! options
19+ yield Content.Props [ DangerouslySetInnerHTML { __ html = converter.makeHtml str } ] ]
20+ [ ]
21+
1122let private voteArea score =
1223 let icon =
1324 if score > 0 then
@@ -29,7 +40,7 @@ let root model dispatch =
2940 [ Image.image [ Image.Is64x64 ]
3041 [ img [ Src ( " avatars/" + model.Author.Avatar) ] ] ]
3142 Media.content [ ]
32- [ Render. contentFromMarkdown [ ] model.Answer.Content
43+ [ contentFromMarkdown [ ] model.Answer.Content
3344 Level.level [ ]
3445 [ Level.right [ CustomClass " vote-area" ]
3546 [ Button.button [ Button.IsLoading model.IsLoading
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ let private questionsView (question : QuestionInfo) answers dispatch =
5555 [ Image.image [ Image.Is64x64 ]
5656 [ img [ Src ( " avatars/" + question.Author.Avatar) ] ] ]
5757 Media.content [ ]
58- [ yield Render .contentFromMarkdown [ ]
58+ [ yield Answer.View .contentFromMarkdown [ ]
5959 question.Description
6060 yield Level.level [ ]
6161 [ Level.left [ ] [ ] // Needed to force the level right aligment
You can’t perform that action at this time.
0 commit comments