Make input escaping optional. Fixes #11

This commit is contained in:
Eric Wood 2017-01-04 18:24:24 -05:00
parent 6495006a0f
commit d01d0c3cb6
No known key found for this signature in database
GPG Key ID: 645B0CD779EED3B5
2 changed files with 12 additions and 4 deletions

View File

@ -12,6 +12,8 @@
latexEnvironment: 'array',
latexEscape: function(text) {
if(!$('#escape').is(':checked')) return text;
var escapeRegExpr = function(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
};

View File

@ -29,6 +29,12 @@
<select id="workbook" name="workbook"></select>
<textarea id="latex-output" readonly="readonly" onclick="this.select();"></textarea>
<div class="settings">
<input type="checkbox" name="escape" id="escape" checked="checked">
<label for="escape">Escape input text</label>
</div>
<p>Mostly untested, so if you find a bug or have a feature request, <a href="https://github.com/eric-wood/excel2latex/issues">let me know!</a>
<p class="disclaimer">Note: this only works with .xlsx files. That means .xls files will <b>not</b> work.</p>
<p>Formatting from the Excel document won't be preserved, only the text will be extracted.</p>