QUnit.module('mediawiki');
QUnit.test('Base', function(assert) {
assert.expect(1);
var content = [
"This is a paragraph with many text styles. This is ''italic'' and this ",
"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',
'this.
This sentence is inline pre-formatted, which stops ',
"'''''this from being bold and italic.''''' This is a blockquote", '', '== Header 2 ==', "=== Header 3 ''with italics'' ===", '==== Header 4 ====', '===== Header 5 =====', '====== Header 6 ======', '----', '* Item 1a', '* Item 1b', '** Item 2', '*** Item 3', '* Item 1c', '# Item 1a', '# Item 1b', '## Item 2', '### Item 3', '# Item 1c', ";I don't really understand what a definition is", ': But blockquotes are easy', ':: Even larger ones', '::::: And really huge ones' ].join('\n'); var context = new rr.Context(mediawiki, content); var iterable = context.rules['wikidoc'].match(context); assert.equal(iterable.next().value.nodes[0].innerHTML, ''); });