From e665a0d3b33ee0509916be1544326323893ac510 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Sun, 3 Feb 2013 15:10:13 -0500 Subject: [PATCH] Added support for org-table syntax This just adds support for using a plus (+) as an intersection character instead of requiring pipes (|). The emacs org-mode table syntax automatically manages ascii tables, but uses pluses for line intersections. --- ext/redcarpet/markdown.c | 2 +- test/redcarpet_test.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ext/redcarpet/markdown.c b/ext/redcarpet/markdown.c index 3253b0f8..9c428b11 100644 --- a/ext/redcarpet/markdown.c +++ b/ext/redcarpet/markdown.c @@ -2102,7 +2102,7 @@ parse_table_header( while (i < under_end && data[i] == ' ') i++; - if (i < under_end && data[i] != '|') + if (i < under_end && data[i] != '|' && data[i] != '+') break; if (dashes < 3) diff --git a/test/redcarpet_test.rb b/test/redcarpet_test.rb index 00ff013b..eaab09d8 100644 --- a/test/redcarpet_test.rb +++ b/test/redcarpet_test.rb @@ -294,6 +294,18 @@ def test_that_tables_flag_works assert render_with({:tables => true}, text) =~ / true}, text) =~ /