Merge pull request #1900 from ether/dont-include-file-name-on-import
strip title out of html during import, pesky abiword behaviorpull/1902/head
commit
7898c350f7
|
@ -151,7 +151,10 @@ exports.doImport = function(req, res, padId)
|
||||||
fs.readFile(destFile, "utf8", function(err, _text){
|
fs.readFile(destFile, "utf8", function(err, _text){
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
text = _text;
|
text = _text;
|
||||||
|
// Title needs to be stripped out else it appends it to the pad..
|
||||||
|
text = text.replace("<title>", "<!-- <title>");
|
||||||
|
text = text.replace("</title>-->");
|
||||||
|
|
||||||
//node on windows has a delay on releasing of the file lock.
|
//node on windows has a delay on releasing of the file lock.
|
||||||
//We add a 100ms delay to work around this
|
//We add a 100ms delay to work around this
|
||||||
if(os.type().indexOf("Windows") > -1){
|
if(os.type().indexOf("Windows") > -1){
|
||||||
|
|
|
@ -100,7 +100,7 @@ else
|
||||||
{
|
{
|
||||||
//add data to buffer
|
//add data to buffer
|
||||||
stdoutBuffer+=data.toString();
|
stdoutBuffer+=data.toString();
|
||||||
|
|
||||||
//we're searching for the prompt, cause this means everything we need is in the buffer
|
//we're searching for the prompt, cause this means everything we need is in the buffer
|
||||||
if(stdoutBuffer.search("AbiWord:>") != -1)
|
if(stdoutBuffer.search("AbiWord:>") != -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue