Skip to content

Commit e9d76f9

Browse files
committed
Version 1.6.6
See changelog (Fixes JDMCreator#16)
1 parent cda2d48 commit e9d76f9

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## LaTeX Table Editor ##
22

3-
**Version 1.6.5**
3+
**Version 1.6.6**
44

55
This is the GitHub page of an Open Source WYSIWYG table editor that exports to multiples languages including LaTeX, ConTeXt, Plain TeX, CSV, HTML, BBCode, Eplain, PreTeXt, Markdown and WML.
66

src/changelog.txt

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ Legend
66
[#] Fixed
77
Dates use a YYYY/MM/DD format.
88

9+
Version 1.6.6 (2019/12/13)
10+
===========
11+
12+
| Note on this release :
13+
| Bug fixes
14+
15+
CORE
16+
17+
[#] Major issue with the way HTML was generated from each cell when there was newlines and no text formatting (#16)
18+
919
Version 1.6.5 (2019/10/23)
1020
===========
1121

src/js.js

+16-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function $id(id) {
1414
/* ==== START CAMPAIGN INFO ==== */
1515

1616
var campaign = {
17-
start: new Date(2019,11,2),
18-
end: new Date(2019,11,17),
17+
start: new Date(2018,11,2),
18+
end: new Date(2018,11,17),
1919
year:2019
2020
},
2121
campaignUsed = localStorage.getItem("campaign") == campaign.year,
@@ -109,7 +109,7 @@ function $id(id) {
109109
return "[rgb]{"+sep+"}";
110110
},
111111
table = new(function() {
112-
this.version = "1.6.5";
112+
this.version = "1.6.6";
113113
this.create = function(cols, rows) {
114114
rows = parseInt(rows, 10);
115115
cols = parseInt(cols, 10);
@@ -863,16 +863,22 @@ this.getHTML = (function(){
863863
return full;
864864
}).replace(/\u200B/g,'');
865865
if(/<br[^a-z>]*>/i.test(html)){
866+
console.log(html);
866867
var opentags = [], html = html.replace(/<\s*(\/?)\s*(br|b|i|u|font\s+[^>]*)[^a-z>]*>/ig,function(full,close,tag){
867868
tag = tag.toLowerCase();
868869
if(tag == "br"){
869-
var str = "</";
870-
opentags.reverse();
871-
str += opentags.join("></")+"><br><";
872-
opentags.reverse();
873-
str += opentags.join("><")+">";
874-
str = str.replace(/<\/\s*font[^>]*>/gi,"</font>");
875-
return str;
870+
if(opentags.length > 0){
871+
var str = "</";
872+
opentags.reverse();
873+
str += opentags.join("></")+"><br><";
874+
opentags.reverse();
875+
str += opentags.join("><")+">";
876+
str = str.replace(/<\/\s*font[^>]*>/gi,"</font>");
877+
return str;
878+
}
879+
else{
880+
return "<br>";
881+
}
876882
}
877883
else if(close){
878884
opentags.pop();

0 commit comments

Comments
 (0)