Parse and render code tag correctly in body
This commit is contained in:
parent
fc2742d890
commit
5022b8c3da
|
@ -1 +1 @@
|
|||
Subproject commit 491616d096e0ded61bd341487f2487d9082d9b5c
|
||||
Subproject commit c1b581c8d13f87d2c4694933a6fcc6b30c37ccb7
|
|
@ -14,15 +14,11 @@ import System.FilePath ((</>))
|
|||
import Data.Time.Clock (UTCTime, getCurrentTime)
|
||||
import Control.Concurrent.MVar (MVar, newEmptyMVar)
|
||||
|
||||
import Data.Aeson (FromJSON)
|
||||
import Data.JSString (pack, append, unpack)
|
||||
import Miso
|
||||
( View
|
||||
, startApp
|
||||
, App (..)
|
||||
, h1_
|
||||
, div_
|
||||
, text
|
||||
, Effect
|
||||
, (<#)
|
||||
, noEff
|
||||
|
@ -34,8 +30,6 @@ import Miso
|
|||
, consoleLog
|
||||
, pushURI
|
||||
, uriSub
|
||||
, time_
|
||||
, class_
|
||||
)
|
||||
import GHCJS.DOM (currentDocument)
|
||||
import GHCJS.DOM.Types (toJSString, fromJSString, Element, JSString)
|
||||
|
@ -46,8 +40,6 @@ import Servant.API
|
|||
import Common.FrontEnd.Action
|
||||
import Common.FrontEnd.Routes
|
||||
import qualified Network.Client as Client
|
||||
import Common.Network.CatalogPostType (CatalogPost)
|
||||
import qualified Common.Network.CatalogPostType as CatalogPost
|
||||
import qualified Common.Component.CatalogGrid as Grid
|
||||
import qualified Common.Component.ThreadView as Thread
|
||||
import qualified Common.Component.TimeControl as TC
|
||||
|
|
|
@ -76,6 +76,7 @@ toPostPart_ node_type node
|
|||
"STRONG" -> parseStrong element
|
||||
"U" -> parseU element
|
||||
"S" -> parseS element
|
||||
"PRE" -> parseCode element
|
||||
"BR" -> return Skip
|
||||
_ -> do
|
||||
consoleLog tagName
|
||||
|
@ -142,3 +143,8 @@ parseS :: Element -> IO PostPart
|
|||
parseS element
|
||||
= parseChildNodes element
|
||||
>>= return . Strikethrough
|
||||
|
||||
parseCode :: Element -> IO PostPart
|
||||
parseCode element
|
||||
= parseChildNodes element
|
||||
>>= return . Code
|
||||
|
|
Loading…
Reference in New Issue