Skip to content

MediaWiki to Texinfo handles code blocks incorrectly #11312

@lemzwerg

Description

@lemzwerg

[pandoc 3.8.2.1]

Consider the following MediaWiki input.

== Test ==

foofoo

 bar
 baz

foofoo

which looks like this

Image

A call using

pandoc -s -f mediawiki -t texinfo

creates the following Texinfo output.

\input texinfo  @c -*-texinfo-*-

@documentencoding UTF-8

@ifnottex
@paragraphindent 0
@end ifnottex
@node Top
@top Top

@node Test
@section Test
foofoo

@code{bar}@*
@code{baz}

foofoo

@bye

Processing this with texi2pdf looks as follows.

Image

As can be seen, the first line of the 'code block' is indented, which is wrong.

The correct solution is to convert MediaWiki code blocks to an @example environment instead:

@example
foo
bar
@end example

which looks like the following.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions