mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 18:58:10 +00:00
FIX: do not cook local date without attributes
This commit is contained in:
parent
3bfd9698c7
commit
54a9073d94
@ -69,7 +69,7 @@ export function setup(helper) {
|
||||
|
||||
helper.registerPlugin(md => {
|
||||
const rule = {
|
||||
matcher: /\[date(.*?)\]/,
|
||||
matcher: /\[date(.+?)\]/,
|
||||
onMatch: addLocalDate
|
||||
};
|
||||
|
||||
|
@ -26,4 +26,12 @@ describe PrettyText do
|
||||
|
||||
expect(PrettyText.format_for_email(cooked)).to match_html(cooked_mail)
|
||||
end
|
||||
|
||||
it 'needs attributes to convert to a local date' do
|
||||
cooked = PrettyText.cook <<~MD
|
||||
[date]
|
||||
MD
|
||||
|
||||
expect(cooked).to include("<p>[date]</p>")
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user