Use frozen_string_literal in all core filters

pull/566/merge
Thibaut Courouble 8 years ago
parent 94470251fe
commit f93ed2649f

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class AttributionFilter < Filter class AttributionFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class CleanLocalUrlsFilter < Filter class CleanLocalUrlsFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class CleanTextFilter < Filter class CleanTextFilter < Filter
EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/ EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class ContainerFilter < Filter class ContainerFilter < Filter
class ContainerNotFound < StandardError; end class ContainerNotFound < StandardError; end

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class EntriesFilter < Filter class EntriesFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class InnerHtmlFilter < Filter class InnerHtmlFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class InternalUrlsFilter < Filter class InternalUrlsFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class NormalizePathsFilter < Filter class NormalizePathsFilter < Filter
def call def call

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class NormalizeUrlsFilter < Filter class NormalizeUrlsFilter < Filter
ATTRIBUTES = { a: 'href', img: 'src', iframe: 'src' } ATTRIBUTES = { a: 'href', img: 'src', iframe: 'src' }

@ -1,3 +1,5 @@
# frozen_string_literal: true
module Docs module Docs
class TitleFilter < Filter class TitleFilter < Filter
def call def call

Loading…
Cancel
Save