Closed peter-dobson-ds closed 3 years ago
Have you tried matching by style name instead of style ID?
I looked a little deeper -
I built my style map based on messages like:
'warning: Unrecognised paragraph style: _1.0sp 0" (Style ID: 10sp0)'
And I used the data in Style ID: to create the row in the style map
It turns out the style has a _ prefix, and if I use the style ID _10sp0 it works the way I want it to.
I need to convert a word document that has a lot of styles with names "10sp0", "10spHanging05", "10spHanging1", "10spHanging15", "10spLeftInd1", "10spLeftInd15", "15sp0", "15sp1", "15spHanging15"
I know that classes in HTML can't start with a digit, so I prefixed them all with a letter.
My style map includes:
Using this style map, mammoth returns warnings for every line in the style_map, reading
Did not understand this style mapping, so ignored it: p.10sp0 => p.a10sp0:fresh
(of course the last part if the warning is different for each row.)
Here's the word document and my style_map.txt file: