eecs485staff / primer-spec

A Jekyll theme for sites with content-heavy pages
https://eecs485staff.github.io/primer-spec/
MIT License
22 stars 12 forks source link

[Enhanced Code Blocks] Avoid showing line numbers on single-line codeblocks #244

Closed seshrs closed 1 year ago

seshrs commented 1 year ago

Context

While browsing EECS 183's Project 1 spec, I noticed that they use single line codeblocks extensively. The line numbers look confusing! See this section for example:

image

This PR changes the behavior of enhanced code blocks so that by default, single-line codeblocks will not show line numbers.

Validation

Visit https://preview.sesh.rs/previews/eecs485staff/primer-spec/244/demo/enhanced-code-blocks.html#no-line-numbers and observe the single line codeblocks in the info callout.

image
github-actions[bot] commented 1 year ago

The spec from this PR is available at https://preview.sesh.rs/previews/eecs485staff/primer-spec/244/.

(Available until Mon Feb 20 2023.)

awdeorio commented 1 year ago

I have wanted this for so long! This is excellent!