Skip to content

Commit

Permalink
Resolve Issue 70: remove vestiges of old metadata syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
distler committed May 15, 2013
1 parent e22cc5a commit aac69ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
1 change: 0 additions & 1 deletion lib/maruku/input/mdline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def line_md_type
return :ulist if self =~ /^[ ]{0,3}([\*\-\+])\s+.*/
return :olist if self =~ /^[ ]{0,3}\d+\.\s+.*/
return :quote if self =~ /^>/
return :metadata if self =~ /^@/
return :ald if self =~ AttributeDefinitionList
return :ial if self =~ InlineAttributeList
return :text # else, it's just text
Expand Down
20 changes: 0 additions & 20 deletions lib/maruku/input/parse_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ def parse_blocks(src)
output << read_abbreviation(src)
when :xml_instr
read_xml_instruction(src, output)
when :metadata
maruku_error "Please use the new meta-data syntax: \n"+
" http://maruku.rubyforge.org/proposal.html\n", src
src.ignore_line
else # warn if we forgot something
line = src.cur_line
maruku_error "Ignoring line '#{line}' type = #{md_type}", src
Expand Down Expand Up @@ -488,22 +484,6 @@ def read_code(src)
md_codeblock(source)
end

# Reads a series of metadata lines with empty lines in between
def read_metadata(src)
hash = {}
while src.cur_line
case src.cur_line.md_type
when :empty
src.shift_line
when :metadata
hash.merge! parse_metadata(src.shift_line)
else break
end
end
hash
end


def read_ref_definition(src, out)
line = src.shift_line

Expand Down
4 changes: 2 additions & 2 deletions spec/block_docs/issue70.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
PENDING - Lines should be able to start with @. Note that a leading space doesn't
Lines should be able to start with @. Note that a leading space doesn't
trigger the old metadata syntax. https://github.com/bhollis/maruku/issues/70
*** Parameters: ***
{}
*** Markdown input: ***
@ foo
*** Output of inspect ***
md_el(:document,[],{},[])
md_el(:document, md_par("@ foo"))
*** Output of to_html ***
<p>@ foo</p>

0 comments on commit aac69ef

Please sign in to comment.