0

几天前,我遇到的一个人向我展示了这种编译为 HTML 的语言,其编译方式与 Coffeescript 编译 Javascript 的方式相同,但这种语言对空格的尊重程度与 Python 相同,尽管它是针对 HTML 的。

我看到的代码示例如下所示:

- html
    - head
        - title
            This is the title.
    - body
        - h1

等等

有谁知道它可能是什么?

4

1 回答 1

3

可能是

他们网站上的例子是:

doctype 5
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript')
      if (foo) {
         bar()
      }
  body
    h1 Jade - node template engine
    #container
      if youAreUsingJade
        p You are amazing
      else
        p Get on it!

变成:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Jade</title>
    <script type="text/javascript">
      if (foo) {
        bar()
      }
    </script>
  </head>
  <body>
    <h1>Jade - node template engine</h1>
    <div id="container">
      <p>You are amazing</p>
    </div>
  </body>
</html> 
于 2012-06-07T23:56:33.637 回答