Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Freeze string literals in TextFormatting module

Alexander Brandon Coles7fe3d3348272
diff --git a/lib/open_project/text_formatting/filters/attachment_filter.rb b/lib/open_project/text_formatting/filters/attachment_filter.rb
index 9b42b14afd2..7cb700e35ae 100644
--- a/lib/open_project/text_formatting/filters/attachment_filter.rb
+++ b/lib/open_project/text_formatting/filters/attachment_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/autolink_filter.rb b/lib/open_project/text_formatting/filters/autolink_filter.rb
index 7a0042aed4a..fc9e8600dd9 100644
--- a/lib/open_project/text_formatting/filters/autolink_filter.rb
+++ b/lib/open_project/text_formatting/filters/autolink_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/bem_css_filter.rb b/lib/open_project/text_formatting/filters/bem_css_filter.rb
index 983474d260e..182faad7159 100644
--- a/lib/open_project/text_formatting/filters/bem_css_filter.rb
+++ b/lib/open_project/text_formatting/filters/bem_css_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/figure_wrapped_filter.rb b/lib/open_project/text_formatting/filters/figure_wrapped_filter.rb
index b621484ef51..ae9526e53ef 100644
--- a/lib/open_project/text_formatting/filters/figure_wrapped_filter.rb
+++ b/lib/open_project/text_formatting/filters/figure_wrapped_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/link_attribute_filter.rb b/lib/open_project/text_formatting/filters/link_attribute_filter.rb
index 2ade89e4ed0..bbd4a1259e8 100644
--- a/lib/open_project/text_formatting/filters/link_attribute_filter.rb
+++ b/lib/open_project/text_formatting/filters/link_attribute_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/macro_filter.rb b/lib/open_project/text_formatting/filters/macro_filter.rb
index f801ba2d03b..445e05d45be 100644
--- a/lib/open_project/text_formatting/filters/macro_filter.rb
+++ b/lib/open_project/text_formatting/filters/macro_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/macros/child_pages.rb b/lib/open_project/text_formatting/filters/macros/child_pages.rb
index e653acfbe1f..38b49c2b49a 100644
--- a/lib/open_project/text_formatting/filters/macros/child_pages.rb
+++ b/lib/open_project/text_formatting/filters/macros/child_pages.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,7 +30,7 @@
module OpenProject::TextFormatting::Filters::Macros
module ChildPages
- HTML_CLASS = "child_pages".freeze
+ HTML_CLASS = "child_pages"
module_function
diff --git a/lib/open_project/text_formatting/filters/macros/child_pages/child_pages_context.rb b/lib/open_project/text_formatting/filters/macros/child_pages/child_pages_context.rb
index 88c72c64288..628c8d8dd43 100644
--- a/lib/open_project/text_formatting/filters/macros/child_pages/child_pages_context.rb
+++ b/lib/open_project/text_formatting/filters/macros/child_pages/child_pages_context.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/macros/create_work_package_link.rb b/lib/open_project/text_formatting/filters/macros/create_work_package_link.rb
index 22da7009019..c862e0a6c81 100644
--- a/lib/open_project/text_formatting/filters/macros/create_work_package_link.rb
+++ b/lib/open_project/text_formatting/filters/macros/create_work_package_link.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -32,7 +34,7 @@ module OpenProject::TextFormatting::Filters::Macros
include OpenProject::StaticRouting::UrlHelpers
end
- HTML_CLASS = "create_work_package_link".freeze
+ HTML_CLASS = "create_work_package_link"
module_function
diff --git a/lib/open_project/text_formatting/filters/macros/embedded_table.rb b/lib/open_project/text_formatting/filters/macros/embedded_table.rb
index f895a157993..4b515bdb5aa 100644
--- a/lib/open_project/text_formatting/filters/macros/embedded_table.rb
+++ b/lib/open_project/text_formatting/filters/macros/embedded_table.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,8 +30,8 @@
module OpenProject::TextFormatting::Filters::Macros
module EmbeddedTable
- CUSTOM_ELEMENT = "opce-macro-embedded-table".freeze
- HTML_CLASS = "embedded-table".freeze
+ CUSTOM_ELEMENT = "opce-macro-embedded-table"
+ HTML_CLASS = "embedded-table"
module_function
diff --git a/lib/open_project/text_formatting/filters/macros/github_pull_request.rb b/lib/open_project/text_formatting/filters/macros/github_pull_request.rb
index db1030b634b..c10b3852bf9 100644
--- a/lib/open_project/text_formatting/filters/macros/github_pull_request.rb
+++ b/lib/open_project/text_formatting/filters/macros/github_pull_request.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,8 +30,8 @@
module OpenProject::TextFormatting::Filters::Macros
module GithubPullRequest
- CUSTOM_ELEMENT = "opce-github-pull-request".freeze
- HTML_CLASS = "github_pull_request".freeze
+ CUSTOM_ELEMENT = "opce-github-pull-request"
+ HTML_CLASS = "github_pull_request"
module_function
diff --git a/lib/open_project/text_formatting/filters/macros/include_wiki_page.rb b/lib/open_project/text_formatting/filters/macros/include_wiki_page.rb
index 12fa8b8d661..3219186f8af 100644
--- a/lib/open_project/text_formatting/filters/macros/include_wiki_page.rb
+++ b/lib/open_project/text_formatting/filters/macros/include_wiki_page.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,7 +30,7 @@
module OpenProject::TextFormatting::Filters::Macros
module IncludeWikiPage
- HTML_CLASS = "include_wiki_page".freeze
+ HTML_CLASS = "include_wiki_page"
module_function
diff --git a/lib/open_project/text_formatting/filters/macros/toc.rb b/lib/open_project/text_formatting/filters/macros/toc.rb
index 1cc69640e54..b7c72583bc2 100644
--- a/lib/open_project/text_formatting/filters/macros/toc.rb
+++ b/lib/open_project/text_formatting/filters/macros/toc.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,7 +30,7 @@
module OpenProject::TextFormatting::Filters::Macros
module Toc
- HTML_CLASS = "toc".freeze
+ HTML_CLASS = "toc"
module_function
diff --git a/lib/open_project/text_formatting/filters/markdown_filter.rb b/lib/open_project/text_formatting/filters/markdown_filter.rb
index 70dbdfd2d2f..39ee6061744 100644
--- a/lib/open_project/text_formatting/filters/markdown_filter.rb
+++ b/lib/open_project/text_formatting/filters/markdown_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/mention_filter.rb b/lib/open_project/text_formatting/filters/mention_filter.rb
index b09a8cf71e2..b691866142e 100644
--- a/lib/open_project/text_formatting/filters/mention_filter.rb
+++ b/lib/open_project/text_formatting/filters/mention_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/pattern_matcher_filter.rb b/lib/open_project/text_formatting/filters/pattern_matcher_filter.rb
index bff549c97a0..ab411734562 100644
--- a/lib/open_project/text_formatting/filters/pattern_matcher_filter.rb
+++ b/lib/open_project/text_formatting/filters/pattern_matcher_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/plain_filter.rb b/lib/open_project/text_formatting/filters/plain_filter.rb
index 1959697b262..7907270f1d2 100644
--- a/lib/open_project/text_formatting/filters/plain_filter.rb
+++ b/lib/open_project/text_formatting/filters/plain_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/relative_link_filter.rb b/lib/open_project/text_formatting/filters/relative_link_filter.rb
index eb18cf32540..f6a4a27b888 100644
--- a/lib/open_project/text_formatting/filters/relative_link_filter.rb
+++ b/lib/open_project/text_formatting/filters/relative_link_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/syntax_highlight_filter.rb b/lib/open_project/text_formatting/filters/syntax_highlight_filter.rb
index abd9f92421d..70aea24da7a 100644
--- a/lib/open_project/text_formatting/filters/syntax_highlight_filter.rb
+++ b/lib/open_project/text_formatting/filters/syntax_highlight_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/table_of_contents_filter.rb b/lib/open_project/text_formatting/filters/table_of_contents_filter.rb
index 91b4d47430d..bbb3a253de5 100644
--- a/lib/open_project/text_formatting/filters/table_of_contents_filter.rb
+++ b/lib/open_project/text_formatting/filters/table_of_contents_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/filters/task_list_filter.rb b/lib/open_project/text_formatting/filters/task_list_filter.rb
index a25fdffcab4..f18480ab7f2 100644
--- a/lib/open_project/text_formatting/filters/task_list_filter.rb
+++ b/lib/open_project/text_formatting/filters/task_list_filter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats.rb b/lib/open_project/text_formatting/formats.rb
index a59155b987d..71c665f1d13 100644
--- a/lib/open_project/text_formatting/formats.rb
+++ b/lib/open_project/text_formatting/formats.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/base_format.rb b/lib/open_project/text_formatting/formats/base_format.rb
index abffe50df00..bfb082e301f 100644
--- a/lib/open_project/text_formatting/formats/base_format.rb
+++ b/lib/open_project/text_formatting/formats/base_format.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/base_formatter.rb b/lib/open_project/text_formatting/formats/base_formatter.rb
index 1fbd4538835..55fe0093f1f 100644
--- a/lib/open_project/text_formatting/formats/base_formatter.rb
+++ b/lib/open_project/text_formatting/formats/base_formatter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/markdown/format.rb b/lib/open_project/text_formatting/formats/markdown/format.rb
index 74f1a85325c..ac0a6c8f736 100644
--- a/lib/open_project/text_formatting/formats/markdown/format.rb
+++ b/lib/open_project/text_formatting/formats/markdown/format.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/markdown/formatter.rb b/lib/open_project/text_formatting/formats/markdown/formatter.rb
index c15434ee52d..440478a12de 100644
--- a/lib/open_project/text_formatting/formats/markdown/formatter.rb
+++ b/lib/open_project/text_formatting/formats/markdown/formatter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/markdown/helper.rb b/lib/open_project/text_formatting/formats/markdown/helper.rb
index 46f1cbfaa89..d12d8ff6938 100644
--- a/lib/open_project/text_formatting/formats/markdown/helper.rb
+++ b/lib/open_project/text_formatting/formats/markdown/helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/plain/format.rb b/lib/open_project/text_formatting/formats/plain/format.rb
index 0b02a7b02be..b46bb7d2570 100644
--- a/lib/open_project/text_formatting/formats/plain/format.rb
+++ b/lib/open_project/text_formatting/formats/plain/format.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/plain/formatter.rb b/lib/open_project/text_formatting/formats/plain/formatter.rb
index 44e30a15102..48468dc1d3e 100644
--- a/lib/open_project/text_formatting/formats/plain/formatter.rb
+++ b/lib/open_project/text_formatting/formats/plain/formatter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/formats/plain/helper.rb b/lib/open_project/text_formatting/formats/plain/helper.rb
index de1952c5203..6dcb5bd47f7 100644
--- a/lib/open_project/text_formatting/formats/plain/helper.rb
+++ b/lib/open_project/text_formatting/formats/plain/helper.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/helpers/link_rewriter.rb b/lib/open_project/text_formatting/helpers/link_rewriter.rb
index e61cec1ce4d..55ebe0a08ce 100644
--- a/lib/open_project/text_formatting/helpers/link_rewriter.rb
+++ b/lib/open_project/text_formatting/helpers/link_rewriter.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/attribute_macros.rb b/lib/open_project/text_formatting/matchers/attribute_macros.rb
index 92aeffe1ae8..c325eb3e6e5 100644
--- a/lib/open_project/text_formatting/matchers/attribute_macros.rb
+++ b/lib/open_project/text_formatting/matchers/attribute_macros.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/base.rb b/lib/open_project/text_formatting/matchers/link_handlers/base.rb
index 006f50688ac..f32dd15b345 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/base.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/base.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/colon_separator.rb b/lib/open_project/text_formatting/matchers/link_handlers/colon_separator.rb
index a73f416c498..569a3bcf36a 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/colon_separator.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/colon_separator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb b/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb
index a89b90083ab..482f79605fe 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/hash_separator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/revisions.rb b/lib/open_project/text_formatting/matchers/link_handlers/revisions.rb
index 08487ffcbe7..a4b507dcfb6 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/revisions.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/revisions.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb b/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
index f4b58eaff9d..8d43b9e03c0 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/regex_matcher.rb b/lib/open_project/text_formatting/matchers/regex_matcher.rb
index eb1854bf9ff..0058559aad8 100644
--- a/lib/open_project/text_formatting/matchers/regex_matcher.rb
+++ b/lib/open_project/text_formatting/matchers/regex_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/resource_links_matcher.rb b/lib/open_project/text_formatting/matchers/resource_links_matcher.rb
index abf35555724..0113f9819ac 100644
--- a/lib/open_project/text_formatting/matchers/resource_links_matcher.rb
+++ b/lib/open_project/text_formatting/matchers/resource_links_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
diff --git a/lib/open_project/text_formatting/matchers/wiki_links_matcher.rb b/lib/open_project/text_formatting/matchers/wiki_links_matcher.rb
index be4607eedd7..fbd75c835f5 100644
--- a/lib/open_project/text_formatting/matchers/wiki_links_matcher.rb
+++ b/lib/open_project/text_formatting/matchers/wiki_links_matcher.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH