mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: fix flakey by duplicating constant (#29636)
This is because rules is pointing to the same array MARKDOWN_IT_RULES, which is modified directly. Modifying rules with << changes the original MARKDOWN_IT_RULES array, so every call to something works with the altered array state from previous calls.
This commit is contained in:
parent
5010fced92
commit
4840060568
@ -223,7 +223,7 @@ module Chat
|
||||
]
|
||||
|
||||
def self.cook(message, opts = {})
|
||||
rules = MARKDOWN_IT_RULES
|
||||
rules = MARKDOWN_IT_RULES.dup
|
||||
rules << "heading" if opts[:user_id] && opts[:user_id].negative?
|
||||
|
||||
# A rule in our Markdown pipeline may have Guardian checks that require a
|
||||
|
Loading…
Reference in New Issue
Block a user