fix: escape URLs in PlantUML files to prevent rendering artifacts - #15
Closed
ChS23 wants to merge 6 commits into
Closed
fix: escape URLs in PlantUML files to prevent rendering artifacts#15ChS23 wants to merge 6 commits into
ChS23 wants to merge 6 commits into
Conversation
Added URL escaping for C4-PlantUML syntax to fix rendering issue where `://` was interpreted as italic formatting, causing `</size>//` artifacts in generated SVG files.
ChS23
added a commit
to ChS23/aact
that referenced
this pull request
Oct 25, 2025
Extracted PlantUML generation logic from unit test into reusable src/pumlGenerator.ts module and added scripts/generate-puml.ts CLI tool with configurable options (--config, --output, --title) to enable diagram generation outside of test suite. Resolves Byndyusoft#7 Depends on Byndyusoft#15
Member
|
Спасибо! Почему-то не проходят тесты — из-за изменений, или они и в основной ветке сейчас сломаны? Сам смогу подробнее глянуть чуть позже |
Contributor
Author
Поправил сравнение в тестах |
Reconciles PR Byndyusoft#15 with the v2 refactor that landed on main. Conflicts resolved by taking main's version for files that were restructured in v2: - resources/architecture/generated.puml: v2 changed the generator's output (no separate System_Ext mid-file, renamed variables). Took main's regenerated structure and re-applied the URL escape via sed (https:// to https:~/~/) which is the actual point of this PR. - examples/banking-plantuml/architecture.test.ts: post-v2 the test no longer string-compares PlantUML content, so the c094bd0 'handle escaped URLs in architecture test comparisons' commit is obsolete -- took main's simpler test.
The SVGs in the original PR Byndyusoft#15 were regenerated from the pre-v2 generator output. Post-v2 the .puml content structure is different (see merge commit), so those SVGs would render against the wrong diagram structure. Revert SVGs to current main; downstream PlantUML rendering will regenerate them from the URL-escaped .puml.
Re-applies the test-comparison fix from the original c094bd0 commit, which was lost when this PR was rebased over v2 (the test moved from test/architecture.test.ts to examples/banking-plantuml/architecture.test.ts). Adds unescapePlantUmlUrl helper and uses it in three places: - check that urls and topics from relations exist in config - connect to external systems only by API Gateway or kafka - checkSections helper (used by find diff in configs and uml dependencies) Without this, the .puml URL escape (https:// to https:~/~/) breaks string equality against the unescaped URLs in resources/kubernetes/microservices/*.yml configs.
9 tasks
Contributor
Author
|
Закрываю как superseded #19. Проблема верная (PlantUML читает Старый diff правит |
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.
Added URL escaping for C4-PlantUML syntax to fix rendering issue where
://was interpreted as italic formatting, causing</size>//artifacts in generated SVG files.Fixes #8