From d1923e6387da9d21b0a06583b9fd0804bc2c7b33 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 20 Feb 2007 10:04:51 -0600 Subject: [PATCH] Sync with latest Maruku. --- vendor/plugins/maruku/lib/maruku/input/parse_span_better.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/plugins/maruku/lib/maruku/input/parse_span_better.rb b/vendor/plugins/maruku/lib/maruku/input/parse_span_better.rb index b0230658..2e1bbf51 100644 --- a/vendor/plugins/maruku/lib/maruku/input/parse_span_better.rb +++ b/vendor/plugins/maruku/lib/maruku/input/parse_span_better.rb @@ -152,8 +152,13 @@ module MaRuKu; module In; module Markdown; module SpanLevelParser con.push_char src.shift_char end when ?& + # named references if m = src.read_regexp(/\&([\w\d]+);/) con.push_element md_entity(m[1]) + # numeric + elsif m = src.read_regexp(/\&\#(x)?([\w\d]+);/) + num = m[1] ? m[2].hex : m[2].to_i + con.push_element md_entity(num) else con.push_char src.shift_char end