mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
FEATURE: adds support for dates in polls (#7450)
This commit is contained in:
parent
ac3dab93f5
commit
1d784c7a18
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user