Skip to content

Fix image conversion from docbook to markdown - #2310

Merged
RogerHaase merged 3 commits into
moinwiki:masterfrom
UlrichB22:issue_1298
Jun 12, 2026
Merged

Fix image conversion from docbook to markdown #2310
RogerHaase merged 3 commits into
moinwiki:masterfrom
UlrichB22:issue_1298

Conversation

@UlrichB22

@UlrichB22 UlrichB22 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

related to #1298

Behavior with current master:

Docbook markup

<article xmlns='http://docbook.org/ns/docbook' xmlns:xlink='http://www.w3.org/1999/xlink'>

<mediaobject>
<imageobject>
  <imagedata format="png" fileref="help-common/logo.png"/>
</imageobject>
</mediaobject>

<mediaobject>
  <audioobject>
    <audiodata fileref="help-common/audio.mp3"/>
  </audioobject>
</mediaobject>

</article>

DOM tree generated with +dom view

<body>
<div html:class="db-article">
<div html:class="db-mediaobject">
<ns2:include type="image/png" html:alt="help-common/logo.png" ns2:href="wiki.local:help-common/logo.png"/>
</div>
<div html:class="db-mediaobject">
<ns2:include type="audio/" html:alt="help-common/audio.mp3" ns2:href="wiki.local:help-common/audio.mp3"/>
</div>
</div>
</body>

converted to markdown

![logo.png](logo.png){: alt="help-common/logo.png" type="image/png"}{: page-href="wiki:///help-common/logo.png" lang="en" dir="ltr" data-href="/help-common/logo.png" class="moin-transclusion"}

![Your Browser does not support HTML5 audio/video element.](audio.mp3){: type="audio/mpeg" alt="help-common/audio.mp3"}{: page-href="wiki:///help-common/audio.mp3" lang="en" dir="ltr" data-href="/help-common/audio.mp3" class="moin-transclusion"}

DOM

<body>
<p>
<ns1:include html:alt="help-common/logo.png" ns1:href="wiki.local:logo.png"/>
}{: page-href="wiki:///help-common/logo.png" lang="en" dir="ltr" data-href="/help-common/logo.png" class="moin-transclusion"
</p>
<p>
<ns1:include html:alt="help-common/audio.mp3" ns1:href="wiki.local:audio.mp3"/>
}{: page-href="wiki:///help-common/audio.mp3" lang="en" dir="ltr" data-href="/help-common/audio.mp3" class="moin-transclusion"
</p>
</body>


New behavior

DOM for docbook

<body>
<div html:class="db-article">
<div html:class="db-mediaobject">
<xinclude:include type="image/png" html:alt="help-common/logo.png" xinclude:href="wiki.local:help-common/logo.png"/>
</div>
<div html:class="db-mediaobject">
<xinclude:include type="audio/" html:alt="help-common/audio.mp3" xinclude:href="wiki.local:help-common/audio.mp3"/>
</div>
</div>
</body>

after conversion

![logo.png](help-common/logo.png){: page-href="wiki:///help-common/logo.png" lang="en" dir="ltr" data-href="/help-common/logo.png" class="moin-transclusion"}

![Your Browser does not support HTML5 audio/video element.](audio.mp3){: page-href="wiki:///help-common/audio.mp3" lang="en" dir="ltr" data-href="/help-common/audio.mp3" class="moin-transclusion"}

DOM

body>
<p>
<xinclude:include html:alt="logo.png" xinclude:href="wiki.local:help-common/logo.png"/>
</p>
<p>
<xinclude:include html:alt="Your Browser does not support HTML5 audio/video element." xinclude:href="wiki.local:audio.mp3"/>
</p>
</body>

@RogerHaase
RogerHaase merged commit 8c14353 into moinwiki:master Jun 12, 2026
10 checks passed
@UlrichB22
UlrichB22 deleted the issue_1298 branch June 12, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants