Repository navigation
Fix font changes inside lists; silence dead-code warnings - #46
Merged
Merged
Conversation
Co-authored-by: setzor <setzor@users.noreply.github.com>
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.
Summary
removeEmptyTextStyle(from@tiptap/extension-text-style) walks all nodes in the selection and callstr.removeMarkover the fullnodeSizeof non-textblock ancestors — inside a list, theol/licontainers match its "no marks" condition, so it stripped the freshly appliedtextStylemark from the text within. Outside lists the ancestors are textblocks, which it skips, so the bug only appeared in lists.removeEmptyTextStyleTextOnlycommand insrc/typography.ts) used bysetFontFamily/unsetFontFamily/setFontSizePx/unsetFontSizePx. Behavior is unchanged everywhere else.is_entry_filenameandis_legacy_entry_filenameinsrc-tauri/src/entry.rsare public helpers currently exercised only by tests, producingdead_codewarnings on everycargo run. Annotated them with#[cfg_attr(not(test), allow(dead_code))]instead of deleting, since they document the filename format contract.src/typography.test.tscovering font family/size set, unset, double-change, and save/load round-trip inside ordered lists.Verification
pnpm test— 77 tests pass (5 new typography tests)pnpm build(tsc + vite) passesentry.rsverified warning-free via a standalonecargo check/cargo test(the full Tauri build needs GTK system libs not present in this sandbox; CI will confirm)