FIX: email preview content not updated in second local date
This commit is contained in:
parent
f38caf30fb
commit
2502a3f780
|
@ -33,10 +33,7 @@ function addLocalDate(buffer, matches, state) {
|
|||
];
|
||||
|
||||
if (config.time) {
|
||||
token.attrs.push([
|
||||
"data-time",
|
||||
state.md.utils.escapeHtml(config.time)
|
||||
]);
|
||||
token.attrs.push(["data-time", state.md.utils.escapeHtml(config.time)]);
|
||||
}
|
||||
|
||||
let dateTime;
|
||||
|
|
|
@ -50,11 +50,12 @@ after_initialize do
|
|||
end
|
||||
|
||||
on(:reduce_cooked) do |fragment|
|
||||
container = fragment.css(".discourse-local-date").first
|
||||
fragment.css(".discourse-local-date").each do |container|
|
||||
|
||||
if container && container.attributes["data-email-preview"]
|
||||
preview = container.attributes["data-email-preview"].value
|
||||
container.content = preview
|
||||
if container.attributes["data-email-preview"]
|
||||
preview = container.attributes["data-email-preview"].value
|
||||
container.content = preview
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue