diff --git a/inst/resources/gitbook/js/plugin-fontsettings.js b/inst/resources/gitbook/js/plugin-fontsettings.js index e8513560f..df2651b14 100644 --- a/inst/resources/gitbook/js/plugin-fontsettings.js +++ b/inst/resources/gitbook/js/plugin-fontsettings.js @@ -88,7 +88,8 @@ gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) { $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, ''); $book.addClass("color-theme-"+fontState.theme); } - $book.find('section').css('line-height', fontState.spacing / 10); + var lineHeight = Math.max(fontState.spacing / 10, 1); + $book.find('section').css('line-height', lineHeight); }; function init(config) {