定制 alcamo/markdown 二次开发

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

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

alcamo/markdown

Composer 安装命令:

composer require alcamo/markdown

包简介

Markdown generation and transformation

README 文档

README

use alcamo\markdown\MarkdownText;

include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';

$markdown1 = MarkdownText::newFromText(
    'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy '
        . 'eirmod tempor invidunt ut labore et dolore magna aliquyam erat, '
        . 'sed diam voluptua.',
    true
);

$markdown1->toBulletListItem();

$markdown2 = MarkdownText::newFromText('At vero eos:');

$markdown2->append(
    MarkdownText::newFromText('foo')->toOrderedListItem(1)
);

$markdown2->append(
    MarkdownText::newFromText('bar')->toOrderedListItem(2)
);

$markdown1->append($markdown2->toBulletListItem());

echo $markdown1->toQuote() . PHP_EOL;

This example is contained in this package as a file in the bin directory. It will output

> * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
>   nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
>   sed diam voluptua.
> * At vero eos:
>    1. foo
>    2. bar

The MarkdownText class is a simple container for markdown text. It does no kind of parsing or redering but has methods to transform text, in particular to prepend something to each line. As shown by the example, this may be particularly useful if existing markdown text is inserted as an item or quote into another text.

See the doxygen documentation for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固