projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1811102
)
KiviLatex-Template-Plugin: leere Listen entfernen
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 3 Apr 2014 14:53:23 +0000
(16:53 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 3 Apr 2014 14:56:33 +0000
(16:56 +0200)
Das sind Einträge, die im HTML so aussehen: <ul> </ul> LaTeX schmeißt
beim Äquivalent (\begin{itemize} \end{itemize}) Fehler. Kann z.B. via
Copy & Paste aus LibreOffice passieren.
SL/Template/Plugin/KiviLatex.pm
patch
|
blob
|
history
diff --git
a/SL/Template/Plugin/KiviLatex.pm
b/SL/Template/Plugin/KiviLatex.pm
index
6683574
..
ca40971
100644
(file)
--- a/
SL/Template/Plugin/KiviLatex.pm
+++ b/
SL/Template/Plugin/KiviLatex.pm
@@
-58,6
+58,7
@@
sub filter_html {
$text =~ s{ \r+ }{}gx;
$text =~ s{ \n+ }{ }gx;
$text =~ s{ (?:\ |\s)+ }{ }gx;
+ $text =~ s{ <ul>\s*</ul> | <ol>\s*</ol> }{}gx; # Remove lists without items. Can happen with copy & paste from e.g. LibreOffice.
my @parts = map {
if (substr($_, 0, 1) eq '<') {