【发布时间】:2016-01-27 18:35:24
【问题描述】:
我的代码是这样的
Python:
render = web.template.render('templates/', base="layout")
.
.
.
fileout_text = codecs.open(filename_text, 'r', 'utf-8').read()
text = markdown.markdown(fileout_text)
return render.text_temple(text=text)
text_template.html:
$def with text
< text>$text < /text>
现在$text 应该包含 html 标签而不是 markdown 语法。
我的问题是,当网站显示时,标签仍然是文本——这是为什么呢?
【问题讨论】:
-
您的问题不清楚。请解释问题并阅读如何正确格式化您的代码。
-
对不起。我的问题是变量 $text 中的 html-tags 不会改变文本的外观。它们完全一样。
-
变量不是 HTML 的一部分。您使用什么语言?
标签: html python-2.7 variables tags markdown