rom*_*tos 10 html markdown pug
有一些方法可以使用Jade 在同一代码行中强化一些单词来生成HTML吗?
我尝试使用markdown代码,就像这样.但是不起作用:
p Here are my **strong words** in my sentence!
Run Code Online (Sandbox Code Playgroud)
我找到的一个独特的解决方案(Here)是:
p Here are my <strong>strong words</strong> in my sentence!
Run Code Online (Sandbox Code Playgroud)
还有其他方法吗?
谢谢!
MrM*_*gli 16
对于Pug或Jade,您需要将元素包装在段落中,并使用|for line continuation.
p
strong This Starts out strong
| but finishes out not
i quite
| as bold.
Run Code Online (Sandbox Code Playgroud)
这将是:
这开始很强,但完成不是那么大胆.
编辑:如评论中所述,在每个组件之前需要一个额外的空格,因为帕格不会添加空格.以上将呈现为:
<p><strong>This Starts out strong </strong> but finishes out not <i> quite </i> as bold.</p>
Run Code Online (Sandbox Code Playgroud)
我认为您可以做到:
p Here is my #[strong strong words] in my sentence!
Run Code Online (Sandbox Code Playgroud)