Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/docx/normalize.docx contains invalid xml #10242

Closed
StephanMeijer opened this issue Sep 30, 2024 · 5 comments
Closed

test/docx/normalize.docx contains invalid xml #10242

StephanMeijer opened this issue Sep 30, 2024 · 5 comments
Labels

Comments

@StephanMeijer
Copy link
Contributor

StephanMeijer commented Sep 30, 2024

Explain the problem.

https://github.com/jgm/pandoc/blob/main/test/docx/normalize.docx contains invalid XML.

How fix

Replace <w:i/ > with <w:i/> in word/document.xml.

Pandoc version?

N/A

@StephanMeijer
Copy link
Contributor Author

@jgm Can you please instruct me how to zip back a .docx after unzipping? My prior method stopped working :)

@jgm
Copy link
Owner

jgm commented Sep 30, 2024

I just use zip. You just need to be careful about the directories.

For example:

% unzip -d my my.docx
% cd my
% # change stuff
% zip -r ../my.docx *

Actually, nowadays I just open the docx with emacs and edit it there; this handles all the zipping/unzipping behind the scenes.

@StephanMeijer
Copy link
Contributor Author

Interesting, this was my prior way to do it, but it seems to corrupt the .docx so that I can't open it with Microsoft Word anymore.

https://gist.github.com/StephanMeijer/af29b0873f7766554d6d7ef594585712

I am a NeoVim user, but will definitely take a look at Emacs just for this.

@jgm
Copy link
Owner

jgm commented Sep 30, 2024

Make sure you haven't introduced any new files inside the directory?

jgm added a commit that referenced this issue Sep 30, 2024
In these cases we emit an empty comment to fix the point from
which indentation is measured; otherwise the block quote is not
parsed as a block quote.

This affects list items and admonitions.

Cloess #10242.
@jgm
Copy link
Owner

jgm commented Sep 30, 2024

sorry, typo in that commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants