gpt4 book ai didi

slim-lang - slim - 文本不被识别为标签

转载 作者:行者123 更新时间:2023-12-04 23:24:20 25 4
gpt4 key购买 nike

一个新的 Slim 问题

我期待以下 Slim 模板

div class="header"
h2 slim head
p a test example of
span Slim
span a new line with span
p
| expected a test example of <span>Slim</span>

生成:
<div class="header">
<h2> slim head </h2>
<p>a test example of <span>Slim</span></p>
<span>a new line with span</span>
<p>expected a test example of <span>Slim</span></p>
</div>

但是,跨度标记未被识别并生成:
<div class="header">
<h2> slim head </h2>
<p>a test example of
span Slim </p>
<span>a new line with span</span>
<p>expected a test example of <span>Slim</span></p>
</div>

为什么将跨度视为文本而不是标签?

谢谢

最佳答案

修身款待您 span作为文本,因为您在同一行中开始了段落的实际内容。您应该使用管道( | )嵌套文本并在其后添加跨度,如下所示:

div class="header"
h2 slim head
p
| a test example of
span Slim
span a new line with span
p
| expected a test example of <span>Slim</span>

这应该正确编译为:
<div class="header">
<h2> slim head </h2>
<p>a test example of <span> Slim</span></p>
<span>a new line with span</span>
<p>expected a test example of <span>Slim</span></p>
</div>

关于slim-lang - slim - 文本不被识别为标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15674027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com