Skip to content

Commit 0bf262b

Browse files
committed
[slides] support role attribute in listing template
1 parent 4b0e74d commit 0bf262b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/ forked to handle classes for sources
2+
- _has_title = title?
3+
- content_for :pre
4+
- if style == 'source' && (_lang = local_attr :language)
5+
/ NOTE class attribute required for highlight.js and prettify
6+
/ QUESTION should we add a "highlight" class to pre?
7+
pre.source id=(id unless _has_title) class=role : code data-lang=_lang class="language-#{_lang} prettyprint" =content
8+
- else
9+
/ QUESTION should we add a class to pre?
10+
pre id=(id unless _has_title) class=role : code =content
11+
- if _has_title
12+
figure.listing id=id
13+
figcaption=title
14+
- yield_content :pre
15+
- else
16+
- yield_content :pre

0 commit comments

Comments
 (0)