Merge pull request #1071 from ppwwyyxx/patch-1

Add foldable css class for codeblocks
This commit is contained in:
Ruipeng Zhang 2022-05-07 20:04:37 -04:00 committed by GitHub
commit e8eef019d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,8 @@
if (fold) {
$('figure.highlight').each(function() {
$(this).addClass('foldable'); // add 'foldable' class as long as fold is enabled
if ($(this).find('figcaption').find('span').length > 0) {
const span = $(this).find('figcaption').find('span');
if (span[0].innerText.indexOf('>folded') > -1) {