定制 landf/epubmarkdown 二次开发

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

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

landf/epubmarkdown

Composer 安装命令:

composer require landf/epubmarkdown

包简介

Just a little help for them. This is a Markdown dialect optimized for EPUB 3.

README 文档

README

by Densho Channel
https://denshochan.com/


Illustration (c) JCN Inc. & Garakuta.

based on:

PHP Markdown Lib by Michel Fortin
http://michelf.ca/

Markdown by John Gruber
http://daringfireball.net/

Features

This library is implementing some features that make writing EPUB content documents easier.

  • GFM style line break
  • Block titles(bridgehead) [deprecated]
  • Global Language Support
    • Japanese Ruby Annotation
    • Tate-Chu-Yoko
  • Twitter account autolink syntax
  • Footnotes with epub:type attribute
  • EPUB pagebreak syntax
  • Chunk file syntax

Requirement

This library package requires PHP 5.5 or later.

Before PHP 5.5, pcre.backtrack_limit defaults to 100 000, which is too small in many situations. You might need to set it to higher values. Later PHP releases defaults to 1 000 000, which is usually fine.

This library also requires Composer to use dependent library PHP Markdown Extra. Before using this library, install Composer and execute composer install.

Usage

$parser = new Denshoch\DenDenMarkdown;
$parser->tarnsform('Hello wolrd!');
// => <p>Hello wolrd!</p>

options

You can pass Harusame options which automatically add special classes for Tate-Chu-Yoko and text orientation in vertical writing mode. It is disabled by default.

$options = array("autoTcyDigit" => 3, "autoTextOrientation" => true);
$parser = new Denshoch\DenDenMarkdown($options);
$parser.transform('10円玉と100円玉がある♡');
// => <p><span class="tcy">10</span>円玉と<span class="tcy">100</span>円玉がある<span class="upright">♡</span></p>
key type inital description
autoTcyDigit integer 0 max digits of number to add .tcy class.
autoTextOrientation boolean false Add .upright and .sideways class or not.

Syntax

Description of EPUB Markdown syntax is available on https://conv.denshochan.com/markdown. Sorry, currently Japanese version only.

Thanks

  • Thanks to Makoto Kitaichi for supporting.

Copyright and License

DenDenMarkdown
Copyright (c) 2013 Densho Channel
http://densho.hatenablog.com/
All rights reserved.

based on:

PHP Markdown Lib Copyright (c) 2004-2013 Michel Fortin
http://michelf.ca/
All rights reserved.

Markdown
Copyright (c) 2003-2005 John Gruber http://daringfireball.net/ All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name "Markdown" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-07-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固