我想从 Markdown 格式中删除 XSL 空格

发布于 2024-10-08 17:29:33 字数 318 浏览 0 评论 0原文

Markdown 格式正在进入我的 XSL 并保留其空白和中断。我希望将其转换为实际的 HTML 元素以删除所有空格。

以下是传入数据和数据。 HTML 源,这是用于处理它的代码。XSL

<xsl:value-of select="description-continued" disable-output-escaping="yes" />

输出方法已包含 indent="no"

Markdown formatting is coming into my XSL and maintaining its whitespace and breaks. I want it to be converted to actual HTML elements to remove all whitespace.

Here's a look at the incoming data & HTML source, and here's the code used to process it..

<xsl:value-of select="description-continued" disable-output-escaping="yes" />

The XSL output method already contains indent="no"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

海的爱人是光 2024-10-15 17:29:33

您可能只需要(如果没有一组空白字符真的很重要):

<xsl:template match="text()">
 <xsl:value-of select="normalize-space()"/>
</xsl:template>

You may just need (in case no group of whitespace characters really matters):

<xsl:template match="text()">
 <xsl:value-of select="normalize-space()"/>
</xsl:template>
哆啦不做梦 2024-10-15 17:29:33
<xsl:value-of select="normalize-space(description-continued)" disable-output-escaping="yes" />
<xsl:value-of select="normalize-space(description-continued)" disable-output-escaping="yes" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文