FEATURE: adds support for dates in polls (#7450)

This commit is contained in:
Joffrey JAFFEUX 2019-04-29 10:01:19 +02:00 committed by GitHub
parent ac3dab93f5
commit 1d784c7a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,13 @@ import round from "discourse/lib/round";
import { relativeAge } from "discourse/lib/formatter";
function optionHtml(option) {
return new RawHtml({ html: `<span>${option.html}</span>` });
const $node = $(`<span>${option.html}</span>`);
$node.find(".discourse-local-date").each((_index, elem) => {
$(elem).applyLocalDates();
});
return new RawHtml({ html: `<span>${$node.html()}</span>` });
}
function infoTextHtml(text) {