Commit 330a0f5
Fix image tag with external source (#1348)
When `rdoc-image` contains an external source, such as
`https://example.com/path/to/image.svg`, the rendered `<img>` tag is
broken. This PR fixes the bug.
For example, I found the problem on the IRB website, where a Markdown
image is present as a source.
Rendered HTML on the website <https://ruby.github.io/irb/>:
```html
<a href="https://badge.fury.io/rb/irb"><img src="https" alt="//badge.fury.io/rb/irb.svg:Gem Version"></a>
```
Screenshot:
<img width="359" alt="image"
src="https://github.com/user-attachments/assets/bf138616-4296-4e30-9eaa-5ee7301e8681"
/>
Markdown source:
<https://github.com/ruby/irb/blob/6349b03f64f173a9d31bc9042430e1134f3e1689/doc/Index.md?plain=1#L3>
```markdown
[](https://badge.fury.io/rb/irb)
```
Probably, this bug was introduced in the commit
894b2f1, i.e.,
<https://github.com/ruby/rdoc/releases/tag/v6.13.0>.
---------
Co-authored-by: Sutou Kouhei <[email protected]>1 parent 9774b48 commit 330a0f5
File tree
2 files changed
+34
-1
lines changed- lib/rdoc/markup
- test/rdoc
2 files changed
+34
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
752 | 782 | | |
753 | 783 | | |
754 | 784 | | |
| |||
0 commit comments