Skip to content

Conversation

@haarg
Copy link
Member

@haarg haarg commented Nov 13, 2024

No description provided.

@codecov
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.14%. Comparing base (73dc5d1) to head (185dd14).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3229      +/-   ##
==========================================
+ Coverage   73.10%   73.14%   +0.04%     
==========================================
  Files          69       69              
  Lines        2398     2398              
  Branches      338      338              
==========================================
+ Hits         1753     1754       +1     
  Misses        517      517              
+ Partials      128      127       -1     

see 1 file with indirect coverage changes

The syntaxhighlighter library strips blank lines at the start of code
block it is trying to highlight. In addition to just being wrong, this
means that line numbers on the source page will not line up with the
real files.

Work around this by providing the library with fake objects that ignore
the attempt to strip these lines. This uses a fake string and a fake
element to hold it. This is an ugly workaround, but allows us to
continue using the syntax highlighter via npm.
Rather than padding empty lines with single spaces, we can use CSS to
ensure correct alignment. This avoids copy/pasting code including
invented spaces on empty lines.
@haarg haarg force-pushed the haarg/fix-synhi-whitespace branch from c6539d6 to 185dd14 Compare November 13, 2024 14:25
@haarg haarg merged commit c6f5789 into master Nov 13, 2024
10 checks passed
@haarg haarg deleted the haarg/fix-synhi-whitespace branch November 13, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants