Disable metadata
This commit is contained in:
+2
-10
@@ -636,16 +636,8 @@ module Gollum
|
|||||||
#
|
#
|
||||||
# Returns the String of formatted data with metadata removed.
|
# Returns the String of formatted data with metadata removed.
|
||||||
def extract_metadata(data)
|
def extract_metadata(data)
|
||||||
@metadata ||= {}
|
@metadata = {}
|
||||||
# The markers are `<!-- ---` and `-->`
|
data
|
||||||
data.gsub(/\<\!--+\s+---(.*?)--+\>/m) do
|
|
||||||
yaml = @wiki.sanitizer.clean($1)
|
|
||||||
hash = YAML.load(yaml)
|
|
||||||
if Hash === hash
|
|
||||||
@metadata.update(hash)
|
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hook for getting the formatted value of extracted tag data.
|
# Hook for getting the formatted value of extracted tag data.
|
||||||
|
|||||||
Reference in New Issue
Block a user