Commit 431e9bd5 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update ExportLatex.js to handle LaTeX special character.

parent e71ee236
*~ *~
.directory
.project .project
*.pyc *.pyc
.pydevproject .pydevproject
......
...@@ -25,6 +25,7 @@ Ext.define('Dbui.grid.mixin.ExportLatex', { ...@@ -25,6 +25,7 @@ Ext.define('Dbui.grid.mixin.ExportLatex', {
var htmlEl = domEl.dom, var htmlEl = domEl.dom,
href, href,
li, li,
reLaTeX = /[&#{_}$%]/g,
value; value;
// is the cell contains an hyper link // is the cell contains an hyper link
...@@ -32,8 +33,10 @@ Ext.define('Dbui.grid.mixin.ExportLatex', { ...@@ -32,8 +33,10 @@ Ext.define('Dbui.grid.mixin.ExportLatex', {
// standard string // standard string
// shrink empty string to avoid latex processing failure // shrink empty string to avoid latex processing failure
// handle latex special character
if (li.length === 0) { if (li.length === 0) {
value = htmlEl.textContent.trim(); value = htmlEl.textContent.trim();
value = value.replace(reLaTeX, "\\$&");
// render the hyper link using latex command href // render the hyper link using latex command href
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment