djplaner / word-to-canvas-module

A userscript that will create a Canvas Module (including all module items) from a Word document (using special styles)
https://djplaner.github.io/word-to-canvas-module/
MIT License
0 stars 0 forks source link

Exploring file link problems #63

Closed djplaner closed 2 years ago

djplaner commented 2 years ago

Some canvas file links - esp. with spaces - can have some problems

Tasks

Fix

Upgrading to the most recent version of Mammoth fixed the problem

djplaner commented 2 years ago

Exploration

To HTML

Similar with the second one.

Track changes

This is also causing problems, save a copy without. Fixes problems with a heading and some warnings...but the break up problem persists.

Internal to the XML (Word document)

One of the filenames is being treated as a separate section. Apparently anything it doesn't recognise

        <w:p w14:paraId="4B01B9EB" w14:textId="3CA3F5C0" w:rsidR="00D04620" w:rsidRDefault="00A64576" w:rsidP="00161C33">
            <w:proofErr w:type="spellStart"/>
            <w:r>
                <w:rPr>
                    <w:rStyle w:val="CanvasFileLink"/>
                </w:rPr>
                <w:t>Wk</w:t>
            </w:r>
            <w:proofErr w:type="spellEnd"/>
            <w:r>
                <w:rPr>
                    <w:rStyle w:val="CanvasFileLink"/>
                </w:rPr>
                <w:t xml:space="preserve"> 3 body.pptx</w:t>
            </w:r>
        </w:p>