lib/kramdown/parser/kramdown/list.rb in kramdown-0.7.0 vs lib/kramdown/parser/kramdown/list.rb in kramdown-0.8.0

- old
+ new

@@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- # #-- -# Copyright (C) 2009 Thomas Leitner <t_leitner@gmx.at> +# Copyright (C) 2009-2010 Thomas Leitner <t_leitner@gmx.at> # # This file is part of kramdown. # # kramdown is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -121,12 +121,10 @@ (it == list.children.last && it.children.length == 2 && !eob_found)) && (list.children.last != it || list.children.size == 1 || list.children[0..-2].any? {|cit| cit.children.first.type != :p}) text = it.children.shift.children.first text.value += "\n" if !it.children.empty? && it.children[0].type != :blank it.children.unshift(text) - else - it.options[:first_is_block] = true end if it.children.last.type == :blank last = it.children.pop else @@ -158,11 +156,11 @@ para = @tree.children.pop first_as_para = true end para.children.first.value.split("\n").each do |term| el = Element.new(:dt) - el.children << Element.new(:text, term) + el.children << Element.new(:raw_text, term) deflist.children << el end item = nil indent_re = nil @@ -205,11 +203,9 @@ end if it.children.first.type == :p && !it.options.delete(:first_as_para) text = it.children.shift.children.first text.value += "\n" if !it.children.empty? it.children.unshift(text) - else - it.options[:first_is_block] = true end end if @tree.children.length >= 1 && @tree.children.last.type == :dl @tree.children[-1].children += deflist.children