定制 limelight/bbcode-markdown-converter 二次开发

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

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

limelight/bbcode-markdown-converter

最新稳定版本:1.2.0

Composer 安装命令:

composer require limelight/bbcode-markdown-converter

包简介

A simple converter for switching between BBCode and Markdown.

README 文档

README

A simple converter for switching between BBCode and Markdown.

Purpose

Whilst there are lots of converters for changing BBCode into Markdown, there aren't many that work in reverse. The aim of this package is to fix that, giving an easily expandable, simple to use class for converting between the two formats.

Installation

composer require limelight/bbcode-markdown-converter

Simple as that.

Example Use

Using the library is pretty easy. First up, converting from BBCode to Markdown.

use \Limelight\Converter\Converter;

require __DIR__ . '/vendor/autoload.php';

$bbCode = file_get_contents(__DIR__ . '/data/test_post.bb'); // Pull the test post.

$conv = new Converter($bbCode)
$conv->bbToMarkdown();
echo $conv->getText();

Easy, right? And the other way around.

use \Limelight\Converter\Converter;

require __DIR__ . '/vendor/autoload.php';

$mdText = file_get_contents(__DIR__ . '/data/test_md.md'); // Pull the test post.

$conv = new Converter($mdText)
$conv->markdownToBB();
echo $conv->getText();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-14