All new
alle new
This commit is contained in:
1 parent
da64472251
commit
5b20adee48
1605 files changed
+396517
-1674
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
var documents = require("./documents");
|
||||
|
||||
function convertElementToRawText(element) {
|
||||
if (element.type === "text") {
|
||||
return element.value;
|
||||
} else if (element.type === documents.types.tab) {
|
||||
return "\t";
|
||||
} else {
|
||||
var tail = element.type === "paragraph" ? "\n\n" : "";
|
||||
return (element.children || []).map(convertElementToRawText).join("") + tail;
|
||||
}
|
||||
}
|
||||
|
||||
exports.convertElementToRawText = convertElementToRawText;
|
||||
Reference in new issue
Block a user