mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Remove logical OR assignment of constants (#29201)
Constants should always be only assigned once. The logical OR assignment of a constant is a relic of the past before we used zeitwerk for autoloading and had bugs where a file could be loaded twice resulting in constant redefinition warnings.
This commit is contained in:

committed by
GitHub

parent
f3f37c9019
commit
322a3be2db
@ -95,7 +95,7 @@ module Email
|
||||
attr_reader :mail
|
||||
attr_reader :message_id
|
||||
|
||||
COMMON_ENCODINGS ||= [-"utf-8", -"windows-1252", -"iso-8859-1"]
|
||||
COMMON_ENCODINGS = [-"utf-8", -"windows-1252", -"iso-8859-1"]
|
||||
|
||||
def self.formats
|
||||
@formats ||= Enum.new(plaintext: 1, markdown: 2)
|
||||
@ -527,7 +527,7 @@ module Email
|
||||
[EmailReplyTrimmer.trim(markdown), elided_markdown]
|
||||
end
|
||||
|
||||
HTML_EXTRACTERS ||= [
|
||||
HTML_EXTRACTERS = [
|
||||
[:gmail, /class="gmail_(signature|extra)/],
|
||||
[:outlook, /id="(divRplyFwdMsg|Signature)"/],
|
||||
[:word, /class="WordSection1"/],
|
||||
|
Reference in New Issue
Block a user