From ee4210a5115e29d02bb1ae8fc6297c2c318eb24b Mon Sep 17 00:00:00 2001 From: Erik Michelson Date: Fri, 3 Jul 2020 00:06:03 +0200 Subject: Added dynamic lang-attr to pretty.ejs CodiMD currently only uses the 'lang' attribute in YAML-metadata of a note for setting certain js-elements of the markdown-renderer. This commit adds the chosen lang into the published version of a note. Signed-off-by: Erik Michelson --- lib/web/note/util.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/web/note/util.js b/lib/web/note/util.js index c5affd05..128c89cf 100644 --- a/lib/web/note/util.js +++ b/lib/web/note/util.js @@ -81,6 +81,7 @@ exports.getPublishData = function (req, res, note, callback) { const data = { title: title, description: meta.description || (markdown ? models.Note.generateDescription(markdown) : null), + lang: meta.lang || null viewcount: note.viewcount, createtime: createtime, updatetime: updatetime, -- cgit v1.2.3