承接 bueltge/marksimple 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

bueltge/marksimple

Composer 安装命令:

composer require bueltge/marksimple

包简介

A simple Markdown parser for PHP.

README 文档

README

CI Maintainability Code Coverage Scrutinizer Code Quality

A simple Markdown parser, short and only with the rules there I currently need. The function is regex based and it is possible to enhance your custom rules.

Yes, I know, it give a lot of open projects that solve the same goal. However it was fun to write my custom parser, only with the rules there I need, not to much overhead. Yes, also I mean that other packages more solid solid, lof of usages, bot not points enough to learn about regex and markdown. Besides I know a regex parser is not the best, fastest way, but also here, I would to teach me in this context.

Demo, Tests

The solution is still active in his tests, you find it here. This test of the class is also build as PWA, Progressive Web App. It was only an fun project for me to understand it on a really simple site how it works. But is important, if you see the directory test in this repository here and wounder about so much files there are not in the context of the Markdown parser. If you will check the PWA, use it on your mobile or play with Chrome/WebInspector.

Active use

The class is simple and I use it for my own documentation, there I write in markdown. Here and there is the result a single oage to help in each day to find the right syntax, hints, background and others. You can see this on this examples:

Support

My class supports currently the follow syntax. But Pull Request are really welcome and the solution give you the possibility to add your own rule.

  • Headers, h1 - h6 - # to ###### before the string
  • Image, ![](path/to/image.png "Alt text")
  • Strong, bold text, strong - ** or __ before and after the string
  • Italic text, em - an * or _ before and after the string
  • Unordered list, ul - * for each line
  • Inline Code, code - an ``` backtick before and after the code string
  • Code Blocks, pre - (4 spaces) or (tab) in each line or the fenced code blocks by placing triple backticks and optional the language identifier,
  • Links, a - [Link Text](Link URL)
  • Horizontal line, ---
  • Break, new line, <br>

Usage

Requirements

  • PHP 7.4

Install static via download, clone the repository or use dependency management via Composer

composer require bueltge/marksimple

You find the solution and the tests in the repository on GitHub.

See the test directory for an example with two different usages. The test directory works as PWA, for examples see only the file index.php.

Code examples

// Example with four spaces.
require_once '../vendor/autoload.php';
use Bueltge\Marksimple\Marksimple;
$ms = new Marksimple();
print $ms->parseFile('../README.md');
// Example Github Code Block ```php.
require_once '../vendor/autoload.php';
use Bueltge\Marksimple\Marksimple;
$ms = new Marksimple();
print $ms->parseFile('../README.md');

Add Logger examples

The MarkSimple class instance uses the psr/log feature.

And the default Logger is the NullLogger it will be created when declaring MarkSimple class instance. The more details about psr/log, please visit this link.

$testee = new Marksimple();
echo get_class($testee->logger()); //output: Psr\Log\NullLogger

Kudos

On the way to the goal of my simple parser I use lot of tests, tries on the online Regex testers. Thanks a lot to the authors of this followed two sites, great!

License

Copyright (c) 2017 until now, Frank Bültge

Good news, this plugin is free for everyone! Since it's released under the MIT License you can use it free of charge on your personal or commercial website.

Contributing

All feedback / bug reports / pull requests are welcome.

bueltge/marksimple 适用场景与选型建议

bueltge/marksimple 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.92k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2018 年 01 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「parser」 「markdown」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 bueltge/marksimple 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 bueltge/marksimple 我们能提供哪些服务?
定制开发 / 二次开发

基于 bueltge/marksimple 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 3
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-27