$pdf-code: true !default;
@if $pdf-code {

    // Preformatted text and code
    // In our HTML, we assume that inline code is in <code> tags
    // and blocks of <code> are in <pre> tags.

    code {
        font-family: $font-code;
        line-height: 1;
        white-space: pre-wrap;
        border-radius: 0.2em;
    }

    pre {
        border-radius: 0.2em;
        line-height: $line-height-default;
        margin: $line-height-default 0;
        padding: 0 $paragraph-indent;

        code {
            padding: 0;
        }

        & + p {
           text-indent: 0;
        }
    }
    // Remove text-indent on paragraphs after the code-highlighting
    // div that Jekyll inserts. This attribute selector should work
    // even if the site's code highlighter is not the default Rouge.
    // Jekyll's inserting this div is ridiculous, see heated discussions at
    // https://github.com/jekyll/jekyll/issues/3738
    // and https://github.com/jekyll/jekyll/issues/4905
    div[class*="highlighter-"] + p {
       text-indent: 0;
    }
}
