mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:01:22 +08:00
DEV: Correctly tag heredocs (#16061)
This allows text editors to use correct syntax coloring for the heredoc sections. Heredoc tag names we use: languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS other: MD, TEXT/TXT, RAW, EMAIL
This commit is contained in:
@ -8,9 +8,9 @@ RSpec.describe "Local Dates" do
|
||||
end
|
||||
|
||||
it "should work without timezone" do
|
||||
post = Fabricate(:post, raw: <<~TXT)
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[date=2018-05-08 time=22:00 format="L LTS" timezones="Europe/Paris|America/Los_Angeles"]
|
||||
TXT
|
||||
MD
|
||||
|
||||
cooked = post.cooked
|
||||
|
||||
@ -28,9 +28,9 @@ RSpec.describe "Local Dates" do
|
||||
end
|
||||
|
||||
it "should work with timezone" do
|
||||
post = Fabricate(:post, raw: <<~TXT)
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[date=2018-05-08 time=22:00 format="L LTS" timezone="Asia/Calcutta" timezones="Europe/Paris|America/Los_Angeles"]
|
||||
TXT
|
||||
MD
|
||||
|
||||
cooked = post.cooked
|
||||
|
||||
@ -39,9 +39,9 @@ RSpec.describe "Local Dates" do
|
||||
end
|
||||
|
||||
it 'requires the right attributes to convert to a local date' do
|
||||
post = Fabricate(:post, raw: <<~TXT)
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[date]
|
||||
TXT
|
||||
MD
|
||||
|
||||
cooked = post.cooked
|
||||
|
||||
@ -50,9 +50,9 @@ RSpec.describe "Local Dates" do
|
||||
end
|
||||
|
||||
it 'requires the right attributes to convert to a local date' do
|
||||
post = Fabricate(:post, raw: <<~TXT)
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[date]
|
||||
TXT
|
||||
MD
|
||||
|
||||
cooked = post.cooked
|
||||
|
||||
|
Reference in New Issue
Block a user