Lines Matching +full:- +full:- +full:no +full:- +full:interaction

18         $this->setSyntax('md');
23 $this->P->addMode('gfm_link', new GfmLink());
24 $this->P->parse('Foo [text](page) Bar');
34 $this->assertCalls($calls, $this->H->calls);
39 $this->P->addMode('gfm_link', new GfmLink());
40 $this->P->parse('Foo [Syntax](wiki:syntax#internal) Bar');
50 $this->assertCalls($calls, $this->H->calls);
55 $this->P->addMode('gfm_link', new GfmLink());
56 $this->P->parse('Foo [Google](http://google.com) Bar');
66 $this->assertCalls($calls, $this->H->calls);
71 $this->P->addMode('gfm_link', new GfmLink());
72 $this->P->parse('Foo [callbacks](wp>Callback) Bar');
82 $this->assertCalls($calls, $this->H->calls);
87 $this->P->addMode('gfm_link', new GfmLink());
88 $this->P->parse('Foo [Page](IW>somepage) Bar');
98 $this->assertCalls($calls, $this->H->calls);
103 $this->P->addMode('gfm_link', new GfmLink());
104 $this->P->parse('Foo [mail](user@example.com) Bar');
114 $this->assertCalls($calls, $this->H->calls);
119 $this->P->addMode('gfm_link', new GfmLink());
120 $this->P->parse('Foo [section](#anchor) Bar');
130 $this->assertCalls($calls, $this->H->calls);
135 $this->P->addMode('gfm_link', new GfmLink());
136 $this->P->parse('Foo [share](\\\\server\\share) Bar');
146 $this->assertCalls($calls, $this->H->calls);
152 // instructions have no title-attribute slot. The title parses
154 // to the no-title case.
155 $this->P->addMode('gfm_link', new GfmLink());
156 $this->P->parse('Foo [Google](http://google.com "Search engine") Bar');
166 $this->assertCalls($calls, $this->H->calls);
171 $this->P->addMode('gfm_link', new GfmLink());
172 $this->P->parse("Foo [page](target 'a title') Bar");
182 $this->assertCalls($calls, $this->H->calls);
188 $this->P->addMode('gfm_link', new GfmLink());
189 $this->P->parse('[foo] (bar)');
190 $modes = array_column($this->H->calls, 0);
191 $this->assertNotContains('internallink', $modes);
192 $this->assertNotContains('externallink', $modes);
199 // refuses single-bracket matches that are actually part of `[[`.
200 $this->P->addMode('gfm_link', new GfmLink());
201 $this->P->addMode('internallink', new Internallink());
202 $this->P->parse('Foo [[bar]] Baz');
212 $this->assertCalls($calls, $this->H->calls);
217 $this->P->addMode('gfm_link', new GfmLink());
218 $this->P->parse('Foo [日本語](page) Bar');
228 $this->assertCalls($calls, $this->H->calls);
233 // `[foo][bar]` (reference-style) requires a reference definition
235 $this->P->addMode('gfm_link', new GfmLink());
236 $this->P->parse('[foo][bar]');
237 $modes = array_column($this->H->calls, 0);
238 $this->assertNotContains('internallink', $modes);
239 $this->assertNotContains('externallink', $modes);
244 $this->P->addMode('gfm_link', new GfmLink());
245 $this->P->parse('Foo [one](a) and [two](b) Bar');
257 $this->assertCalls($calls, $this->H->calls);
262 $this->P->addMode('gfm_link', new GfmLink());
263 $this->P->parse('Foo [x](http://example.com#fragment) Bar');
273 $this->assertCalls($calls, $this->H->calls);
276 // ----- image-as-label (`[![alt](img)](target)`) -----
279 * Media descriptor shape GfmLink emits for image-as-label, matching
300 $this->P->addMode('gfm_link', new GfmLink());
301 $this->P->parse('Foo [![alt](wiki:image.png)](test:link) Bar');
306 ['internallink', ['test:link', $this->mediaArray([])]],
311 $this->assertCalls($calls, $this->H->calls);
316 $this->P->addMode('gfm_link', new GfmLink());
317 $this->P->parse('Foo [![alt](wiki:image.png)](http://example.com) Bar');
322 ['externallink', ['http://example.com', $this->mediaArray([])]],
327 $this->assertCalls($calls, $this->H->calls);
332 $this->P->addMode('gfm_link', new GfmLink());
333 $this->P->parse('Foo [![logo](https://example.com/logo.png)](test:link) Bar');
338 ['internallink', ['test:link', $this->mediaArray([
347 $this->assertCalls($calls, $this->H->calls);
352 $this->P->addMode('gfm_link', new GfmLink());
353 $this->P->parse('Foo [![alt](wiki:image.png)](wp>Example) Bar');
358 ['interwikilink', ['wp>Example', $this->mediaArray([]), 'wp', 'Example']],
363 $this->assertCalls($calls, $this->H->calls);
368 $this->P->addMode('gfm_link', new GfmLink());
369 $this->P->parse('Foo [![alt](wiki:image.png)](user@example.com) Bar');
374 ['emaillink', ['user@example.com', $this->mediaArray([])]],
379 $this->assertCalls($calls, $this->H->calls);
385 $this->P->addMode('gfm_link', new GfmLink());
386 $this->P->parse('Foo [![alt](wiki:image.png?200x100&right&nolink)](test:link) Bar');
391 ['internallink', ['test:link', $this->mediaArray([
401 $this->assertCalls($calls, $this->H->calls);
406 $this->P->addMode('gfm_link', new GfmLink());
407 $this->P->parse('Foo [![](wiki:image.png)](test:link) Bar');
412 ['internallink', ['test:link', $this->mediaArray(['title' => null])]],
417 $this->assertCalls($calls, $this->H->calls);
423 // DW's media nor link instructions have a title-attribute slot.
424 $this->P->addMode('gfm_link', new GfmLink());
425 $this->P->parse('Foo [![alt](wiki:image.png "img title")](test:link "link title") Bar');
430 ['internallink', ['test:link', $this->mediaArray([])]],
435 $this->assertCalls($calls, $this->H->calls);
438 // ----- backslash-escape interaction (GFM §6.1) -----
442 // Plain-text label gets §6.1 unescape applied before it reaches
444 $this->P->addMode('gfm_link', new GfmLink());
445 $this->P->parse('Foo [te\\*xt](page) Bar');
455 $this->assertCalls($calls, $this->H->calls);
463 $this->P->addMode('gfm_link', new GfmLink());
464 $this->P->parse('Foo [link \\[bar](page) Baz');
474 $this->assertCalls($calls, $this->H->calls);
481 $this->P->addMode('gfm_link', new GfmLink());
482 $this->P->parse('Foo [a\\]b](page) Bar');
492 $this->assertCalls($calls, $this->H->calls);
500 $this->P->addMode('gfm_link', new GfmLink());
501 $this->P->parse('Foo [text](http://example.com/pa\\!ge) Bar');
511 $this->assertCalls($calls, $this->H->calls);
516 // Carve-out: a `\\host\path` URL must survive classify() and
520 $this->P->addMode('gfm_link', new GfmLink());
521 $this->P->parse('Foo [share](\\\\server\\share\\sub) Bar');
531 $this->assertCalls($calls, $this->H->calls);
539 $this->P->addMode('gfm_link', new GfmLink());
540 $this->P->parse("A [link with\na newline](http://example.org)?");
550 $this->assertCalls($calls, $this->H->calls);
557 $this->P->addMode('gfm_link', new GfmLink());
558 $this->P->parse("[link with\n\nblank line](http://example.org)");
559 $modes = array_column($this->H->calls, 0);
560 $this->assertNotContains('externallink', $modes);
561 $this->assertNotContains('internallink', $modes);
566 $this->assertSame(300, (new GfmLink())->getSort());