diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
index c425b4b4e..9449d2f30 100644
--- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
+++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js
@@ -380,7 +380,7 @@ function newSuperalgosDocSpace() {
for (let i = 1; i < 10; i++) {
if (paragraphNode.id === undefined || paragraphNode.id.indexOf('paragraph') < 0) {
paragraphNode = paragraphNode.parentNode
- if (paragraphNode === undefined) { return false}
+ if (paragraphNode === undefined) { return false }
}
}
if (paragraphNode.id === undefined || paragraphNode.id.indexOf('paragraph') < 0) {
@@ -1428,9 +1428,21 @@ function newSuperalgosDocSpace() {
function parseTable(text) {
let HTML = ''
let odd = false
+ /* When the text is not formatted as a table, we auto format it as a single cell table */
+ if (text.indexOf('|') < 0) {
+ text = "|" + text + "|"
+ }
+
+ /* We process the text based table*/
let rows = text.split(String.fromCharCode(10))
for (let i = 0; i < rows.length; i++) {
let row = rows[i]
+ if (row === '') {
+ if (i === rows.length - 1) {
+ HTML = HTML + ''
+ }
+ continue
+ }
let colums = row.split('|')
if (i === 0) {
HTML = HTML + ''
@@ -1446,7 +1458,7 @@ function newSuperalgosDocSpace() {
odd = true
}
if (colums.length < 2) {
- return text
+ continue
} else {
/* We discard anything before the first | and after the last | */
for (let j = 1; j < colums.length - 1; j++) {
@@ -1467,28 +1479,54 @@ function newSuperalgosDocSpace() {
HTML = HTML + ''
}
}
+ HTML = addRGB(HTML)
return HTML
- }
+ function addRGB(text) {
+ const RGB_HTML = ' ', '')
text = text.replace('
', '')
text = text.replace('', '')
text = text.replace('', '')
text = text.replace('