Merge pull request #1072 from ppwwyyxx/master

Make codeblock fold/unfold use a larger clickable area
This commit is contained in:
Ruipeng Zhang 2022-05-07 20:04:46 -04:00 committed by GitHub
commit 63cef9061d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -90,6 +90,10 @@ figure.highlight
min-width: inherit
border-radius: inherit
figure.highlight.foldable
div.level-left
cursor: pointer // clicking the codeblock filename can toggle folding
/* ---------------------------------
* Fix Gist Snippet
* --------------------------------- */

View File

@ -113,7 +113,7 @@
toggleFold(this, fold === 'folded');
});
$('figure.highlight figcaption .fold').click(function() {
$('figure.highlight figcaption .level-left').click(function() {
const $code = $(this).closest('figure.highlight');
toggleFold($code.eq(0), !$code.hasClass('folded'));
});