Skip to content

Commit

Permalink
Don't show "more" button if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavide committed Jan 8, 2019
1 parent 15929ec commit a84e162
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs_italia_theme/static/js/theme.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions js/markup_modifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ module.exports = themeMarkupModifier = (function ($) {
$hiddenBlock = $deepeningElements.slice(4, $deepeningElements.length);
}

$hiddenBlock.wrapAll('<div class="admonition__hidden-paragraph">');
$(this).append(btn);
if ($hiddenBlock.length > 0) {
$hiddenBlock.wrapAll('<div class="admonition__hidden-paragraph">');
$(this).append(btn);
}
});
}

Expand Down

0 comments on commit a84e162

Please sign in to comment.