Conversation
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 4/5
- In
src/formats/docx/mod.rs, malformed Wingdingsw:charvalues such as+00A3can be incorrectly emitted as checkboxes, producing inaccurate document output; validate the attribute contains only the permitted short hexadecimal digits before parsing.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/formats/docx/mod.rs">
<violation number="1" location="src/formats/docx/mod.rs:9">
P2: When a Wingdings symbol has a malformed `w:char` such as `+00A3`, the new symbol parser still emits a checkbox. Validate that the attribute contains only the permitted short hexadecimal digits before parsing so malformed symbols keep the existing behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| mod content; | ||
| mod numbering; | ||
| mod styles; | ||
| mod symbols; |
There was a problem hiding this comment.
P2: When a Wingdings symbol has a malformed w:char such as +00A3, the new symbol parser still emits a checkbox. Validate that the attribute contains only the permitted short hexadecimal digits before parsing so malformed symbols keep the existing behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/formats/docx/mod.rs, line 9:
<comment>When a Wingdings symbol has a malformed `w:char` such as `+00A3`, the new symbol parser still emits a checkbox. Validate that the attribute contains only the permitted short hexadecimal digits before parsing so malformed symbols keep the existing behavior.</comment>
<file context>
@@ -6,6 +6,7 @@
mod content;
mod numbering;
mod styles;
+mod symbols;
use crate::error::ConvertError;
</file context>
This branch has not been deployed
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.
DOCX checkbox symbols stored as
w:symwere dropped during parsing. In a table containing a checked option followed by an unchecked alternative, this left the alternative as bare text and changed how the content could be interpreted.Map the supported Wingdings and Wingdings 2 checked/unchecked glyphs to Unicode, including their private-use encodings, while retaining run styling and text order. Unknown or malformed symbols keep the existing behavior. Tests use only synthetic in-memory documents.
Validation:
cargo test --locked(299 passed, 1 ignored),cargo clippy --workspace --all-targets --all-features -- -D warnings, andcargo fmt --all --check. Regression tests fail before the fix and pass afterward.Summary by cubic
Fixes DOCX parsing so checkbox symbols stored as
w:symare preserved instead of dropped, which previously left unchecked options as bare text in tables.Maps supported Wingdings and Wingdings 2 checked/unchecked glyphs to their Unicode equivalents, including private-use encodings, and retains run styling and text order. Rejects malformed or overlong character codes and keeps existing unsupported-symbol behavior for unknown font/code pairs.
Written for commit 2f0907d. Summary will update on new commits.