Merged
Conversation
Cover all font-lock features that had no test coverage: - number: integer, float, hex, ratio, bigint, bigdec, radix - char: character literals (\a, \newline, \space, \tab, \u0041) - constant: true, false, nil - keyword: simple, auto-resolved, namespaced - string: plain strings, escape sequences - comment: line comments, discard expressions, comment macro - quote: ', `, ~, ~@, #' - regex: regex literal highlighting - bracket: parens, brackets, braces, set literal (level 4) - deref: @ operator (level 4) - function: function calls (level 4) - tagged-literals: #inst, #uuid (level 4)
Test docstring highlighting in forms that were previously uncovered: defmacro, defmulti, defprotocol, ns, and defprotocol method docstrings. Test the default behavior of clojure-ts-comment-macro-font-lock-body (comment symbol gets comment-delimiter-face, body is not highlighted as comment).
Add support for ("substring" face) specs alongside the existing
(start end face) positional specs in the test helpers. Substring
specs use sequential search-forward, so repeated substrings resolve
naturally in document order.
Convert most existing and new font-lock tests from opaque numeric
positions to readable substring form, making the tests much easier
to understand and maintain.
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.
Add tests for all previously untested font-lock features and switch to more readable substring-based face assertions.
clojure-ts-comment-macro-font-lock-body("substring" face)) to the test helpers, alongside the existing positional form