定制 tuchsoft/commonmark-ext-heading-shifter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tuchsoft/commonmark-ext-heading-shifter

最新稳定版本:1.0.3

Composer 安装命令:

composer require tuchsoft/commonmark-ext-heading-shifter

包简介

A CommonMark extension to adjust (decrease) heading levels by a custom amount.

README 文档

README

License: MIT Copyright: Tuchsoft

CommonMark extension for shifting heading levels by a configurable amount of levels.

Install

composer require tuchsoft/commonmark-ext-heading-shifter

Usage

use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment;
use TuchSoft\CommonMarkHeadingShifter\HeadingShifterExtension;

$converter = new CommonMarkConverter([
    'heading_shifter' => [
        'shift_by' => 1
        ]
    ]);

$converter->getEnvironment()->addExtension(new HeadingShifterExtension());

$converter->convertToHtml("# Heading"); //<h2>Heading</h2>

Author

👤 Mattia Bonzi @ TuchSoft mattia@tuchsoft.com

TuchSoft logo

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

统计信息

  • 总下载量: 186
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-17