Ensure that highlighted lines do not have empty lines between them#63
Merged
Ensure that highlighted lines do not have empty lines between them#63
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the template syntax-highlighting HTML output to avoid rendering extra blank lines between highlighted source lines, particularly in <pre><code> output where line wrappers and explicit \n separators interact.
Changes:
- Adjust line-wrapper styling for highlighted lines from
display:blocktodisplay:inline-block. - Extend
highlight_module_test/1with anassert_in_order/2check around debug checkbox output and the highlighted identifier.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/template_compiler_highlight.erl |
Tweaks inline CSS for per-line wrapper spans to prevent visual double-spacing between lines. |
test/template_compiler_highlight_SUITE.erl |
Adds an ordering assertion in the module-highlighting test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several improvements to the template highlighting and debug point rendering in
template_compiler_highlight.erl, as well as updates to the related test suite. The main focus is on improving the structure and accessibility of debug checkboxes, as well as refining the line styling for highlighted templates.Rendering and accessibility improvements:
aria-labeland atitleattribute for better accessibility, and thearia-labelno longer redundantly includes the filename.Styling adjustments:
STYLE_LINECSS is changed fromdisplay:blocktodisplay:inline-blockto improve the layout of highlighted lines.Test enhancements:
highlight_module_testnow asserts the order of rendered HTML elements to ensure the debug checkbox and its label appear before the highlighted span, improving test coverage for rendering correctness.