mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 21:02:48 +08:00
FIX: attempts to convert french quotes to regular quotes in dates (#10986)
This commit is contained in:
parent
a8d03e428d
commit
f4842ae283
|
@ -13,7 +13,7 @@ function addLocalDate(buffer, matches, state) {
|
|||
countdown: null,
|
||||
};
|
||||
|
||||
const matchString = matches[1].replace(/„|“/g, '"');
|
||||
const matchString = matches[1].replace(/„|“|«|»/g, '"');
|
||||
|
||||
let parsed = parseBBCodeTag(
|
||||
"[date date" + matchString + "]",
|
||||
|
|
|
@ -89,4 +89,13 @@ describe PrettyText do
|
|||
expect(excerpt).to eq('Wednesday, October 16, 2019 6:00 PM (UTC)')
|
||||
end
|
||||
end
|
||||
|
||||
context 'french quotes' do
|
||||
let(:post) { Fabricate(:post, raw: '[date=2019-10-16 time=14:00:00 format="LLLL" timezone=«America/New_York»]') }
|
||||
|
||||
it 'converts french quotes to regular quotes' do
|
||||
excerpt = PrettyText.excerpt(post.cooked, 200)
|
||||
expect(excerpt).to eq('Wednesday, October 16, 2019 6:00 PM (UTC)')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user