mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Drive spreadsheet table not converting to Markdown table
This commit is contained in:
parent
6cb2b68b22
commit
4654f076f5
1 changed files with 10 additions and 9 deletions
|
@ -619,6 +619,8 @@ export default Ember.Component.extend({
|
|||
_detectTable(text) {
|
||||
if (text.endsWith("\n")) {
|
||||
text = text.substring(0, text.length - 1);
|
||||
}
|
||||
|
||||
let rows = text.split("\r").join("").split("\n");
|
||||
|
||||
if (rows.length > 1) {
|
||||
|
@ -632,7 +634,6 @@ export default Ember.Component.extend({
|
|||
return "|" + rows.map(r => r.split("\t").join("|")).join("|\n|") + "|\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue