Upstream thephpleague/commonmark state of the touched files before bc9ea56dab
This commit is contained in:
1 parent
a17ed29842
commit
05090894a0
2 files changed
-17
No files matched your search
@@ -30,7 +30,6 @@ final class InlinesOnlyExtension implements ConfigurableExtensionInterface
|
|||||||
'use_underscore' => Expect::bool(true),
|
'use_underscore' => Expect::bool(true),
|
||||||
'enable_strong' => Expect::bool(true),
|
'enable_strong' => Expect::bool(true),
|
||||||
'enable_em' => Expect::bool(true),
|
'enable_em' => Expect::bool(true),
|
||||||
'unordered_list_markers' => Expect::listOf('string')->min(1)->default(['*', '+', '-'])->mergeDefaults(false),
|
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,20 +64,4 @@ final class InlinesOnlyFunctionalTest extends TestCase
|
|||||||
[$markdown, $html],
|
[$markdown, $html],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* InlinesOnlyExtension reuses the shared 'commonmark' config schema, so the
|
|
||||||
* option must be accepted even though it renders no lists.
|
|
||||||
*
|
|
||||||
* @see https://github.com/thephpleague/commonmark/issues/1015
|
|
||||||
*/
|
|
||||||
public function testUnorderedListMarkersConfigIsAccepted(): void
|
|
||||||
{
|
|
||||||
$environment = new Environment(['commonmark' => ['unordered_list_markers' => ['*']]]);
|
|
||||||
$environment->addExtension(new InlinesOnlyExtension());
|
|
||||||
$converter = new MarkdownConverter($environment);
|
|
||||||
|
|
||||||
$this->assertSame(['*'], $environment->getConfiguration()->get('commonmark/unordered_list_markers'));
|
|
||||||
$this->assertSame('<em>foo</em>', \trim($converter->convert('*foo*')->getContent()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user