Fix generated IconData body for SVGs containing ##13
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the generated icon body string delimiter in src/generator.rs to use three hash marks (r###"..."###) instead of one, and adds integration tests for the logos:chrome icon. However, changing the raw string delimiter breaks the parser in extract_raw_string_value which specifically looks for r#" and "#. The parser needs to be updated to support the new delimiter or dynamically handle the number of hash marks.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
This PR fixes icon code generation for SVG content that contains sequences such as
"#fff".Previously, generated icon bodies used
r#"... "#raw string literals. SVG attributes likefill="#fff"contain the"#sequence, which prematurely terminates the raw string and causes the generated Rust code to fail to compile.The generator now emits icon bodies using
r###"..."###, preventing conflicts with common SVG attribute values.Changes
IconDatabody literals fromr#"... "#tor###"..."###logos:chrometo the integration test suite as a regression testfill="#fff"Example
Before:
After:
Testing
test_generated_code_compileslogos:chrome, which contains SVG attributes that previously triggered the issueCloses #12