Skip to content

Pandoc treats <w:highlight w:val="none"/> in docx sources as highlighting #10900

@afontenot

Description

@afontenot

Explain the problem.

I generated the document test.docx with OnlyOffice by adding a little bit of text, highlighting part of it, and selecting "no fill" for the highlight color. (As an example, this could happen naturally if something was highlighted by accident, and then "no fill" was selected to remove the highlighting.)

Running pandoc -o test.typ test.docx results in the following output:

This is some text.

#highlight[This is some text.]

#highlight[This is some text.]

This seems to be due to the following in the source document:

      <w:r>
        <w:rPr>
          <w:highlight w:val="none"/>
        </w:rPr>
        <w:t xml:space="preserve">This is some text.</w:t>
      </w:r>

I don't observe any issue with the test file when opening it in e.g. LibreOffice.

Pandoc version?

3.7.0.2 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions