私はText.ParserCombinators.ParsecとText.XHtmlを使用して、次のような入力を解析しています。
this is the beginning of the paragraph --this is an emphasized text-- and this is the end\n
そして、私の出力は次のようになります。
<p>this is the beginning of the paragraph <em>this is an emphasized text</em> and this is the end\n</p>
このコードは、強調された要素を解析して返します
em = do{
;count 2 (char '-') ;
;s <- manyTill anyChar (count 2 (char '-'))
;return (emphasize << s)
}
しかし、強調項目のある段落を取得する方法がわかりません
何か案は?
ありがとう!!