纺织 - 如何将类添加到定义列表中?

发布于 2024-10-16 13:53:57 字数 1094 浏览 4 评论 0 原文

我正在使用 RedCloth 转换一些 textile 文本转换为 html。

一种特定场景似乎特别适合使用定义列表

使用 RedCloth,定义列表具有以下语法():

- coffee := Hot and black
- tea := Also hot, but a little less black
- milk :=
Nourishing beverage for baby cows.

Cold drink that goes great with cookies. =:

我想添加将类“beverages”添加到该列表(以便生成的代码看起来像

...)。我已经尝试过:

(beverages)- coffee := Hot and black
...

我也尝试过:

-(beverage) coffee := Hot and black
-(beverage) tea := Also hot, but a little less black
...

这是您在纺织中设置其他列表(uls 和 ols)样式的方式,但它不适用于dls。文本被呈现为文字段落(

-(beverage) Coffee := Hot and black

是否有一种语法可以将类添加到纺织中的定义列表中,或者必须我用原始 html 代替?

I'm using RedCloth to convert some textile text into html.

One particular scenario seems particularly apt for using definition lists.

With RedCloth, definition lists have this syntax (source):

- coffee := Hot and black
- tea := Also hot, but a little less black
- milk :=
Nourishing beverage for baby cows.

Cold drink that goes great with cookies. =:

I want to add the class "beverages" to that list (so that the generated code looks like <dl class="beverages">...). I've tried this:

(beverages)- coffee := Hot and black
...

I also tried:

-(beverage) coffee := Hot and black
-(beverage) tea := Also hot, but a little less black
...

This is the way you style the other lists (uls and ols) in textile, but it didn't work for dls. The text was rendered as a literal paragraph (<p>-(beverage) coffee := Hot and black</p>)

Is there a syntax for adding classes to definition lists in textile, or must I use raw html instead?

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

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

发布评论

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

评论(2

枫以 2024-10-23 13:53:57

旧的 - :- 语法不允许添加类/id,但以下内容将起作用:

;(defclass#defid) Lorem
: Lorem ipsum dolor sit amet

将产生

<dl class="defclass" id="defid">
    <dt>Lorem</dt>
    <dd>Lorem ipsum dolor sit amet</dd>
</dl>

The old - :- syntax does not allow adding classes/ids, but the following will work:

;(defclass#defid) Lorem
: Lorem ipsum dolor sit amet

will produce

<dl class="defclass" id="defid">
    <dt>Lorem</dt>
    <dd>Lorem ipsum dolor sit amet</dd>
</dl>
风月客 2024-10-23 13:53:57

目前无法将类别或 ID 分配给纺织品的定义列表。

我在这里为此创建了一个问题:

http://jgarber.lighthouseapp.com/projects/13054/tickets/208-classes-or-ids-cant-be-specified-in-definition-lists

It is currently not possible to assign classes or ids to definition lists on textile.

I've created an issue for this here:

http://jgarber.lighthouseapp.com/projects/13054/tickets/208-classes-or-ids-cant-be-specified-in-definition-lists

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文