Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"email": "smn.andre@gmail.com"
}
],
"homepage": "https://github.com/altophp/commonmark",
"homepage": "https://altophp.com/commonmark",
"support": {
"issues": "https://github.com/altophp/commonmark/issues",
"source": "https://github.com/altophp/commonmark",
"docs": "https://altophp.com/commonmark"
},
"funding": [
Expand All @@ -42,6 +43,11 @@
"php": "^8.3",
"league/commonmark": "^2.7"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.92",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^12.5"
},
"replace": {
"alto/commonmark-code-block-title": "self.version",
"alto/commonmark-content-slicer": "self.version",
Expand All @@ -53,11 +59,6 @@
"alto/commonmark-table-of-contents": "self.version",
"alto/commonmark-tabs": "self.version"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.92",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^12.5"
},
"autoload": {
"psr-4": {
"Alto\\CommonMark\\": "src/"
Expand All @@ -68,14 +69,18 @@
"Alto\\CommonMark\\Tests\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"scripts": {
"cs": "vendor/bin/php-cs-fixer fix",
"cs": "vendor/bin/php-cs-fixer fix --dry-run --diff --sequential",
"cs:fix": "vendor/bin/php-cs-fixer fix --sequential",
"qa": [
"@cs",
"@sa",
"@test"
],
"sa": "vendor/bin/phpstan analyse",
"sa": "vendor/bin/phpstan analyse --memory-limit=-1",
"test": "vendor/bin/phpunit"
}
}
3 changes: 3 additions & 0 deletions src/Extension/CodeBlockTitle/CodeBlockTitleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use League\CommonMark\Extension\ExtensionInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class CodeBlockTitleExtension implements ExtensionInterface
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/CodeBlockTitle/CodeBlockTitleRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use League\CommonMark\Util\HtmlElement;
use League\CommonMark\Util\Xml;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class CodeBlockTitleRenderer implements NodeRendererInterface
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/CodeBlockTitle/InfoStringParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace Alto\CommonMark\Extension\CodeBlockTitle;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class InfoStringParser
{
/** @return array{lang: string|null, attrs: array<string,string>} */
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/ContentSlicer/ContentSlicerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use League\CommonMark\Event\DocumentParsedEvent;
use League\CommonMark\Extension\ExtensionInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class ContentSlicerExtension implements ExtensionInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/ContentSlicer/SectionNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use League\CommonMark\Renderer\NodeRendererInterface;
use League\CommonMark\Util\HtmlElement;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final class SectionNode extends AbstractBlock implements NodeRendererInterface
{
public function render(Node $node, ChildNodeRendererInterface $childRenderer): \Stringable
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/ContentSlicer/SectioningListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use League\CommonMark\Event\DocumentParsedEvent;
use League\CommonMark\Extension\CommonMark\Node\Block\Heading;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class SectioningListener
{
public function __construct(
Expand Down
2 changes: 2 additions & 0 deletions src/Extension/HeadingLevel/HeadingLevelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* down?: int,
* callback?: callable(int): ?int
* }
*
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class HeadingLevelExtension implements ExtensionInterface
{
Expand Down
6 changes: 5 additions & 1 deletion src/Extension/HeadingLevel/HeadingLevelProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
use League\CommonMark\Extension\CommonMark\Node\Block\Heading;
use League\CommonMark\Node\Query;

/** @phpstan-import-type HeadingLevelConfig from HeadingLevelExtension */
/**
* @phpstan-import-type HeadingLevelConfig from HeadingLevelExtension
*
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class HeadingLevelProcessor
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/Import/ImportExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
use League\CommonMark\Renderer\ChildNodeRendererInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final class ImportExtension implements ExtensionInterface
{
private string $basePath;
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/Include/IncludeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
use League\CommonMark\Renderer\ChildNodeRendererInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class IncludeExtension implements ExtensionInterface
{
private string $basePath;
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/LinkRewriter/LinkRewriterExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use League\CommonMark\Extension\ExtensionInterface;
use League\CommonMark\Node\Node;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class LinkRewriterExtension implements ExtensionInterface
{
/** @var \Closure(string, Node): string */
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/LinkRewriter/LinkRewriterProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use League\CommonMark\Extension\CommonMark\Node\Inline\Link;
use League\CommonMark\Node\Node;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class LinkRewriterProcessor
{
/** @var \Closure(string, Node): string */
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/LinkRewriter/Rewriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

use League\CommonMark\Node\Node;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class Rewriter
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/Source/SourceExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
use League\CommonMark\Renderer\ChildNodeRendererInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class SourceExtension implements ExtensionInterface
{
private string $basePath;
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/TableOfContents/TableOfContentsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
use League\CommonMark\Renderer\ChildNodeRendererInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class TableOfContentsExtension implements ExtensionInterface
{
/** @var array<string, mixed> */
Expand Down
3 changes: 3 additions & 0 deletions src/Extension/Tabs/TabsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
use League\CommonMark\Renderer\ChildNodeRendererInterface;
use League\CommonMark\Renderer\NodeRendererInterface;

/**
* @author Simon André <smn.andre@gmail.com>
*/
final readonly class TabsExtension implements ExtensionInterface
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Testing/CommonMarkExtensionTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
use League\CommonMark\MarkdownConverter;
use PHPUnit\Framework\TestCase;

/**
* @author Simon André <smn.andre@gmail.com>
*/
abstract class CommonMarkExtensionTestCase extends TestCase
{
private ?Environment $env = null;
Expand Down
Loading