Commit 600f67a
committed
rest2html: treat referenced wrapped images in base document as inlined
docutils will only add newlines around images it believes are inlined.
For images held in references, it checks the parent of the reference if
its a `TextElement` to consider it inlined. Since a document is not a
`TextElement` type, it will wrap an image with newlines. For GitHub
output, this is not desired and will result in the extra whitespace
being rendered with a reference's decorative line. To avoid this,
always strip any appended suffixes for images in this scenario.
Signed-off-by: James Knight <git@jdknight.me>1 parent 6f4f436 commit 600f67a
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
| |||
0 commit comments