【问题标题】:Yesod: how to output pretty htmlYesod:如何输出漂亮的 html
【发布时间】:2015-05-20 01:00:36
【问题描述】:

如何打印格式良好的 html?

我想要app.locals.pretty = true 之类的东西。 ExpressJS: how to output pretty html

【问题讨论】:

    标签: haskell yesod hamlet


    【解决方案1】:

    根据Text.Hamlet.Html's definition,Hamlet 使用blaze-markup 作为其输出。反过来,blaze-markup 有一个渲染器后端,其名称为 Text.Blaze.Renderer.Pretty。

    所以我认为如果你运行你的 Hamlet 模板来获得最终的 Html,然后通过调用 Text.Blaze.Renderer.Pretty.renderMarkup 自己渲染它,那么应该可行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-25
      • 1970-01-01
      • 2016-08-26
      • 2014-12-13
      • 2014-08-16
      • 2013-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多