From aac69efa70146e72a6aa1b5819d0ab5dae195bc7 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 14 May 2013 23:12:41 -0500 Subject: [PATCH] Resolve Issue 70: remove vestiges of old metadata syntax --- lib/maruku/input/mdline.rb | 1 - lib/maruku/input/parse_block.rb | 20 -------------------- spec/block_docs/issue70.md | 4 ++-- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/lib/maruku/input/mdline.rb b/lib/maruku/input/mdline.rb index 1b01bf1..b5f3372 100644 --- a/lib/maruku/input/mdline.rb +++ b/lib/maruku/input/mdline.rb @@ -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 diff --git a/lib/maruku/input/parse_block.rb b/lib/maruku/input/parse_block.rb index 98e1886..5c0791a 100644 --- a/lib/maruku/input/parse_block.rb +++ b/lib/maruku/input/parse_block.rb @@ -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 @@ -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 diff --git a/spec/block_docs/issue70.md b/spec/block_docs/issue70.md index 5235df2..778f6f3 100644 --- a/spec/block_docs/issue70.md +++ b/spec/block_docs/issue70.md @@ -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 ***

@ foo