gpt4 book ai didi

javascript - ^\n\n\n 的含义

转载 作者:行者123 更新时间:2023-11-28 13:36:22 26 4
gpt4 key购买 nike

我正在尝试在reveal.js 中加载外部markdown 文件,该文件已编写为遵守数据分隔符语法:

You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file. The data-charset attribute is optional and specifies which charset to use when loading the external file.

<section data-markdown="example.md"  
data-separator="^\n\n\n"
data-vertical="^\n\n"
data-notes="^Note:"
data-charset="iso-8859-15">
</section>

我认为这应该意味着在 example.md 中,三个新行应该意味着一个新部分,而两个新行应该意味着一个新的垂直部分。然而,这种情况并没有发生。我觉得我错过了一些明显的东西,比如 ^ 字符的平均值。

这里是引用:https://github.com/hakimel/reveal.js/blob/master/README.md

感谢您的帮助。

最佳答案

“^\n\n\n”是一个正则表达式,意思是“3个空行”。
“^”表示行开始。

关于javascript - ^\n\n\n 的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21044839/

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