几天前,我认识的人向我展示了这种语言编译成HTML,就像Coffeescript对Javascript一样,但这种语言与Python的空白具有相同程度的尊重,尽管它适用于HTML。
我看到的代码示例看起来像这样:
- html
- head
- title
This is the title.
- body
- h1
等
任何人都知道它可能是什么?
答案 0 :(得分:3)
可能是Jade?
他们网站的例子是:
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>