Commit 8dc9784
fix(core): encode spaces in data: URI image targets
AbstractNode#imageUri() short-circuited on any data: URI target by
returning it unchanged, added to avoid a spurious "could not retrieve
image data from URI" warning when embedding inline SVGs. That bypassed
the space-encoding that normalizeWebPath() still applies to every other
URI-ish target, and that upstream Asciidoctor (Ruby) also applies since
image_uri has no data:-specific early return. Run data: targets through
encodeSpacesInUri() before returning them so output matches Ruby again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent f1c93e5 commit 8dc9784
3 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
479 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
796 | 807 | | |
797 | 808 | | |
798 | 809 | | |
| |||
0 commit comments