Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/filter/markdown_engines/base.rb')
-rw-r--r--lib/banzai/filter/markdown_engines/base.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/banzai/filter/markdown_engines/base.rb b/lib/banzai/filter/markdown_engines/base.rb
index 34f1d4d3da9..66d6440e257 100644
--- a/lib/banzai/filter/markdown_engines/base.rb
+++ b/lib/banzai/filter/markdown_engines/base.rb
@@ -4,8 +4,10 @@ module Banzai
module Filter
module MarkdownEngines
class Base
+ attr_reader :context
+
def initialize(context)
- @context = context
+ @context = context || {}
end
def render(text)
@@ -15,7 +17,7 @@ module Banzai
private
def sourcepos_disabled?
- @context[:no_sourcepos]
+ context[:no_sourcepos]
end
end
end