Skip to content

Commit

Permalink
Evernote bug is partly fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Feb 10, 2015
1 parent b5f4766 commit f6024d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ function onConnection(socket) {
socket.on('code save', function(articleInfo) {
var relativeDir = 'upload';
var rendered = renderCode(articleInfo.code, uploadDir, relativeDir);
console.log(rendered);
var html = jade.renderFile('./views/article.jade', { title: articleInfo.title, content: rendered });
fs.writeFileSync(am.dir + articleInfo.id + '/index.html', html);
fs.writeFileSync(am.dir + articleInfo.id + '/index.md', articleInfo.code);
Expand Down
6 changes: 3 additions & 3 deletions lib/en-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ function enmlize(code) {
linenoStr += i.toString() + '<br />';
}
after = '<table><tr>';
after += '<td style="color:#ccc; border-right:1px';
after += ' solid #eee; text-align:right; width: 30px;">' + linenoStr + '</td>';
after += '<td style="padding-right: 5px; color:#ccc; border-right:1px solid #eee; text-align:right; width: 30px;">';
after += '<pre><code>' + linenoStr + '</code></pre></td>';
after += '<td style="padding-left: 5px;">' + matchCode[0] + '</td>';
after += '</tr></table>';
code = code.replace(regexCode, after);
} while (matchCode);

// remove 'class' and 'id'
code = extendCssInline(code);
code = removeIdClass(code);

// replace single <tag> to <tag />
var regSingle = /\<(hr)\>/;
Expand Down
5 changes: 4 additions & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ exports.edit = function(req, res) {
var articleId = md5.digest('hex');
var folder = am.dir + articleId;

console.log("hogehoge");
fs.mkdir(folder, function(err) {
if (err) {
console.log('Failed to make a new directory');
Expand Down Expand Up @@ -64,6 +63,10 @@ exports.edit = function(req, res) {

res.render('edit', {
fields: formData,
config: {
host: config.host,
port: config.port
}
});
});
} else {
Expand Down

0 comments on commit f6024d9

Please sign in to comment.