1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-10 07:47:07 +01:00

Improve XML encoding for Word docs.

Fix various encoding errors.
This commit is contained in:
hacksalot
2015-12-31 06:38:30 -05:00
parent 069c02ddcc
commit b85d40b1b3
4 changed files with 93 additions and 4 deletions

View File

@ -47,6 +47,7 @@ Definition of the Markdown to WordProcessingML conversion routine.
break;
case 'Chars':
if( tok.chars.trim().length ) {
var style = is_bold ? '<w:b/>' : '';
style += is_italic ? '<w:i/>': '';
style += is_link ? '<w:rStyle w:val="Hyperlink"/>' : '';
@ -54,6 +55,7 @@ Definition of the Markdown to WordProcessingML conversion routine.
(is_link ? ('<w:hlink w:dest="' + link_url + '">') : '') +
'<w:r><w:rPr>' + style + '</w:rPr><w:t>' + tok.chars +
'</w:t></w:r>' + (is_link ? '</w:hlink>' : '');
}
break;
}
});