PHPackages                             jsw/commonmark-danraku-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jsw/commonmark-danraku-extension

ActiveCommonmark-extension[Parsing &amp; Serialization](/categories/parsing)

jsw/commonmark-danraku-extension
================================

League/commonmark extension for japanese danraku style.

1.0.3(3y ago)015Apache-2.0PHP

Since Feb 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JanStanleyWatt/commonmark-danraku-extension)[ Packagist](https://packagist.org/packages/jsw/commonmark-danraku-extension)[ RSS](/packages/jsw-commonmark-danraku-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

CommonMark Danraku Extension
============================

[](#commonmark-danraku-extension)

[League/CommonMark](https://commonmark.thephpleague.com/) extension for japanese danraku style.

自動で段落の頭に全角スペースを入れてくれたり、区切り約物の直後に全角スペースを入れてくれる[League/CommonMark](https://commonmark.thephpleague.com/)拡張機能。

Installation
------------

[](#installation)

`$ composer require jsw/commonmark-danraku-extension`

Usage
-----

[](#usage)

```
$environment = new Environment($config);

$environment
    ->addExtension(new CommonMarkCoreExtension())
    ->addExtension(new DanrakuExtension());

$converter = new MarkdownConverter($environment);

$markdown = 'この拡張機能は実によい・・・まさに革命的だ';

//　この拡張機能は実によい・・・まさに革命的だ
echo $converter->convert($markdown);
```

config
------

[](#config)

```
// 以下、デフォルトでの設定
$config = [
    'jisage' => [
        'ignore_alphabet' => false, // trueにすると、行頭が英数字だった場合には字下げをしなくなる
        'ignore_dash' => true,      // trueにすると、全角ダッシュ（―）、ハイフンで字下げをしなくなる
    ],
    'yakumono' => [
        'spacing_yakumono' => true, // trueにすると、「？」と「！」の前に全角スペースを空けるようになる（閉じ括弧の直前を除く）
        'byte_sensitive' => true,   // trueにすると、全角「？」「！」の場合は全角スペースを、半角「!」「?」の場合は半角スペースを挿入するようになる
    ],
];
```

Licence
-------

[](#licence)

Apache License, Version 2.0

- [英語原文](https://www.apache.org/licenses/LICENSE-2.0)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

4

Last Release

1146d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ebbd8053b9e8fb20fc1f789289116bea820bfec6b771acb181f02115987b9fa?d=identicon)[JanStanleyWatt](/maintainers/JanStanleyWatt)

---

Tags

commonmarkcomposer-librarymarkdownphpmarkdownmdcommonmarkextension

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jsw-commonmark-danraku-extension/health.svg)

```
[![Health](https://phpackages.com/badges/jsw-commonmark-danraku-extension/health.svg)](https://phpackages.com/packages/jsw-commonmark-danraku-extension)
```

###  Alternatives

[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M702](/packages/league-commonmark)[zoon/commonmark-ext-youtube-iframe

Extension for league/commonmark to replace youtube link with iframe

12275.9k1](/packages/zoon-commonmark-ext-youtube-iframe)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
