diff --git a/server/router/projects/index.js b/server/router/projects/index.js index b156b36..596c9a4 100644 --- a/server/router/projects/index.js +++ b/server/router/projects/index.js @@ -1527,7 +1527,7 @@ module.exports = function (options) { console.log("Done processing all...") } - response.redirect(`/project/${project.id}`) + response.redirect(`/projects/${project.id}`) } else { next() } diff --git a/server/router/translate/index.js b/server/router/translate/index.js index cfbf8d8..db4127e 100644 --- a/server/router/translate/index.js +++ b/server/router/translate/index.js @@ -368,11 +368,15 @@ module.exports = function (options) { response.contentType = "text/plain" response.send(tokens.reduce( (accumulator, token) => { - if (token.type == "list_item_close" || token.type == "bullet_list_open") { + if (token.type == "list_item_close") { return accumulator } - if (token.type == "bullet_list_close" ) { + if (token.type == "ordered_list_open" || token.type == "bullet_list_open") { + return accumulator + } + + if (token.type == "bullet_list_close" || token.type == "ordered_list_close") { return accumulator + "\n" } @@ -386,12 +390,21 @@ module.exports = function (options) { } if (token.type == "list_item_open") { - return accumulator + "- " + return accumulator + `${token.info}${token.markup} ` } if (token.type == "inline") { return accumulator + token.content } + + if (token.type == "heading_open") { + return `${accumulator}${token.markup} ` + } + + if (token.type == "heading_close") { + return `${accumulator}\n` + } + return accumulator + token.markup }, ""