PHPackages                             whojinn/danraku - 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. whojinn/danraku

Abandoned → [jsw/commonmark-danraku-extension](/?search=jsw%2Fcommonmark-danraku-extension)ArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

whojinn/danraku
===============

League/commonmark extension for japanese danraku style.

1.2.1(4y ago)068Apache-2.0PHPPHP ^8.0 || ^8.1

Since Sep 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JanStanleyWatt/old-danraku)[ Packagist](https://packagist.org/packages/whojinn/danraku)[ RSS](/packages/whojinn-danraku/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (19)Used By (0)

[![PHP Composer](https://github.com/whojinn/danraku/actions/workflows/php.yml/badge.svg)](https://github.com/whojinn/danraku/actions/workflows/php.yml)[![Packagist PHP Version Support](https://camo.githubusercontent.com/055f69afdd880833c7db58a2c0ff85ba20cdfbbb5ad2b9dec5868b4b94067d7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77686f6a696e6e2f64616e72616b75)](https://camo.githubusercontent.com/055f69afdd880833c7db58a2c0ff85ba20cdfbbb5ad2b9dec5868b4b94067d7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77686f6a696e6e2f64616e72616b75)[![Packagist Version](https://camo.githubusercontent.com/ea69e871a3b1044a12711158d8387e541140cd71e158cbded5c74bff9b6bd04d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77686f6a696e6e2f64616e72616b75)](https://camo.githubusercontent.com/ea69e871a3b1044a12711158d8387e541140cd71e158cbded5c74bff9b6bd04d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77686f6a696e6e2f64616e72616b75)[![Packagist Downloads](https://camo.githubusercontent.com/81a8ec61edd7dd993bd32344c7ee99f7e616dc8c1062324f6c6885f5a6bc4f60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77686f6a696e6e2f64616e72616b75)](https://camo.githubusercontent.com/81a8ec61edd7dd993bd32344c7ee99f7e616dc8c1062324f6c6885f5a6bc4f60/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77686f6a696e6e2f64616e72616b75)[![GitHub](https://camo.githubusercontent.com/101d32f49fd6cb625103919d15d09088ebef4b84f25b1f009b322ad68cf9746c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77686f6a696e6e2f64616e72616b75)](https://camo.githubusercontent.com/101d32f49fd6cb625103919d15d09088ebef4b84f25b1f009b322ad68cf9746c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77686f6a696e6e2f64616e72616b75)

Notice
======

[](#notice)

Due to the ID change, I decided to recreate this repository. This repository will no longer be updated. Please refer to [this repository](https://github.com/JanStanleyWatt/danraku) instead.

ID変更に伴い、このリポジトリを新しく作り直すことにしました。以後、このリポジトリは更新されません。代わりに、[こちらのリポジトリ](https://github.com/JanStanleyWatt/danraku)をご参照ください。

Danraku
=======

[](#danraku)

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

インストール方法
--------

[](#インストール方法)

`$ composer require whojinn/danraku`

使用方法
----

[](#使用方法)

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

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

$converter = new MarkdownConverter($environment);

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

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

設定
--

[](#設定)

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

ライセンス
-----

[](#ライセンス)

Apache License, Version 2.0

- [英語原文](https://www.apache.org/licenses/LICENSE-2.0)
- [日本語参考訳](https://licenses.opensource.jp/Apache-2.0/Apache-2.0.html)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~8 days

Recently: every ~32 days

Total

18

Last Release

1556d ago

Major Versions

0.5.0.x-dev → 1.0.02021-09-21

PHP version history (2 changes)0.1.2PHP ^7.4 || ^8.0

1.2.0PHP ^8.0 || ^8.1

### Community

Maintainers

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

---

Top Contributors

[![JanStanleyWatt](https://avatars.githubusercontent.com/u/12198769?v=4)](https://github.com/JanStanleyWatt "JanStanleyWatt (71 commits)")

---

Tags

commonmarkcommonmark-extensionmarkdownphpmarkdownmdcommonmarkextension

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/whojinn-danraku/health.svg)

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

###  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)
