diff --git a/grammars/mediawiki.js b/grammars/mediawiki.js
index d3e4140..b15aa7e 100644
--- a/grammars/mediawiki.js
+++ b/grammars/mediawiki.js
@@ -260,7 +260,13 @@ var mediawiki = {
rr.SingleLineText()),
- 'wikidoc': rr.Node('wikidoc', rr.Sequence(
+ 'paragraph': rr.Node('p', rr.Sequence(
rr.ZeroOrMore(rr.Ref('multiline-wikichunk')),
+ rr.Or(
+ rr.Sequence(rr.EndOfLine(), rr.Literal('\n')),
+ rr.EndOfText()))),
+
+ 'wikidoc': rr.Node('wikidoc', rr.Sequence(
+ rr.ZeroOrMore(rr.Ref('paragraph')),
rr.EndOfText()))
};
diff --git a/test.js b/test.js
index 82f95c8..e5023b9 100644
--- a/test.js
+++ b/test.js
@@ -7,7 +7,7 @@ QUnit.test('Base', function(assert) {
"is '''bold'''; this is '''''both'''''. This is underline as is ",
"this. This is '''''underlined, bold and italic'''''. ",
'This is strikethrough, as is this. Source ',
- 'code looks like this. Fixed width text looks like',
+ 'code looks like this. Fixed width text looks like ',
'this.
This sentence is inline pre-formatted, which stops ',
"'''''this from being bold and italic.''''' This is a paragraph with many text styles. This is italic and ',
+ 'this \nis bold; this is strikethrough, as is this. Source ',
+ '\ncode looks like this. Fixed width text looks like \n',
+ 'this.
This sentence is inline pre-formatted, which stops \n', + "'''''this from being bold and italic.'''''We can also \nstop ", + '<u>this from being underlined</u>, or just try \n', + '<pre>interrupting cow style.</pre>
This is a ", + "blockquote
", + 'But blockquotes are easy