Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 30fd40fbe5 |
+1
-1
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|||||||
s.required_ruby_version = ">= 1.8.7"
|
s.required_ruby_version = ">= 1.8.7"
|
||||||
|
|
||||||
s.name = 'gollum'
|
s.name = 'gollum'
|
||||||
s.version = '2.1.9'
|
s.version = '2.1.10'
|
||||||
s.date = '2012-08-30'
|
s.date = '2012-08-30'
|
||||||
s.rubyforge_project = 'gollum'
|
s.rubyforge_project = 'gollum'
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
|
|||||||
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
|
||||||
|
|
||||||
module Gollum
|
module Gollum
|
||||||
VERSION = '2.1.9'
|
VERSION = '2.1.10'
|
||||||
|
|
||||||
def self.assets_path
|
def self.assets_path
|
||||||
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|
::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
|
||||||
|
|||||||
@@ -591,12 +591,18 @@ module Gollum
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
# Extract metadata for data and build metadata table. Metadata
|
# Extract metadata for data and build metadata table. Metadata
|
||||||
# is content found between ` <!-- --- ` and ` --> ` markers, and must
|
# is content found between markers, and must
|
||||||
# be a valid YAML mapping.
|
# be a valid YAML mapping.
|
||||||
#
|
#
|
||||||
|
# Because ri and ruby 1.8.7 are awesome, the markers can't
|
||||||
|
# be included in this documentation without triggering
|
||||||
|
# `Unhandled special: Special: type=17`
|
||||||
|
# Please read the source code for the exact markers
|
||||||
|
#
|
||||||
# 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.gsub(/\<\!--+\s+---(.*?)--+\>/m) do
|
data.gsub(/\<\!--+\s+---(.*?)--+\>/m) do
|
||||||
yaml = @wiki.sanitizer.clean($1)
|
yaml = @wiki.sanitizer.clean($1)
|
||||||
hash = YAML.load(yaml)
|
hash = YAML.load(yaml)
|
||||||
|
|||||||
Reference in New Issue
Block a user