Merge pull request #1071 from ppwwyyxx/patch-1
Add foldable css class for codeblocks
This commit is contained in:
commit
e8eef019d1
|
@ -98,6 +98,8 @@
|
||||||
|
|
||||||
if (fold) {
|
if (fold) {
|
||||||
$('figure.highlight').each(function() {
|
$('figure.highlight').each(function() {
|
||||||
|
$(this).addClass('foldable'); // add 'foldable' class as long as fold is enabled
|
||||||
|
|
||||||
if ($(this).find('figcaption').find('span').length > 0) {
|
if ($(this).find('figcaption').find('span').length > 0) {
|
||||||
const span = $(this).find('figcaption').find('span');
|
const span = $(this).find('figcaption').find('span');
|
||||||
if (span[0].innerText.indexOf('>folded') > -1) {
|
if (span[0].innerText.indexOf('>folded') > -1) {
|
||||||
|
|
Loading…
Reference in New Issue