PHPackages                             conde-nast-international/copilot-markdown-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. conde-nast-international/copilot-markdown-generator

AbandonedArchivedLibrary[API Development](/categories/api)

conde-nast-international/copilot-markdown-generator
===================================================

Generator classes for Copilot-flavored Markdown tags.

v0.2.2(7y ago)32.5k1MITPHPPHP &gt;=5.3

Since Dec 6Pushed 7y ago9 watchersCompare

[ Source](https://github.com/conde-nast-international/copilot-markdown-generator-php)[ Packagist](https://packagist.org/packages/conde-nast-international/copilot-markdown-generator)[ Docs](https://github.com/conde-nast-international/copilot-markdown-generator-php)[ RSS](/packages/conde-nast-international-copilot-markdown-generator/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

copilot-markdown-generator (PHP)
================================

[](#copilot-markdown-generator-php)

> Generator classes for Copilot-flavored Markdown tags.

This is a utility library for generating Copilot-flavored Markdown, created for use in PHP implementations of the [Flyway Integration API](https://conde-nast-international.github.io/flyway-api-docs).

Install
-------

[](#install)

Using [Composer](https://getcomposer.org/):

```
$ composer require conde-nast-international/copilot-markdown-generator
```

Basic usage
-----------

[](#basic-usage)

```
use CopilotTags\Text;

$tag = new Text("Hello world!");
$markdown = $tag->render();
echo $markdown;
// Hello world!
```

See the [example implementation](https://github.com/conde-nast-international/copilot-markdown-generator-php/tree/master/example), which shows how the library can be used to convert custom XML content.

Contributing
------------

[](#contributing)

See the [Contributing](https://github.com/conde-nast-international/copilot-markdown-generator-php/blob/master/CONTRIBUTING.md) document for guidance on making contributions to the project.

API
---

[](#api)

This library is a collection of simple Markdown generator classes namespaced in `CopilotTags` (e.g. `CopilotTags\Paragraph`).

Several of the generators take a text parameter. The given text value can contain any valid Copilot-flavored Markdown, which allows for tags to be nested.

**NOTE:** You need to escape any Markdown characters in the source content that should not be treated as Markdown:

```
addcslashes($content, "!\"#$%&'()*+,-./:;?@[\\]^_`{|}~");
```

### CopilotTag

[](#copilottag)

Interface for tag generator classes.

- `CopilotTag->render()`

    Render tag object as beautified Copilot-flavored Markdown string.
    **Return:** string (Markdown)

### Text

[](#text)

Generator for unformatted text.

```
(new Text("Hello world!"))->render();
// "Hello world!"
```

- `new Text($text)`
    ***text:*** string (Markdown)

### Heading

[](#heading)

Generator for [ATX headings](http://spec.commonmark.org/0.27/#atx-headings).

```
(new Heading("Hello world!", 3))->render();
// "\n\n### Hello world!\n"
```

- `new Heading($text[, $level])`
    ***text:*** string (Markdown)
    ***level:*** int (default: `2`) (min: `2`) (max: `4`)

### Paragraph

[](#paragraph)

Generator for [paragraphs](http://spec.commonmark.org/0.27/#paragraphs).

```
(new Paragraph("Hello world!"))->render();
// "\n\nHello world!\n\n"
```

- `new Paragraph($text)`
    ***text:*** string (Markdown)

### InlineText

[](#inlinetext)

Generator for inline text tags: [emphasis](https://github.com/conde-nast-international/copilot-markdown/blob/master/specification/0E.md#3111-emphasis), [strong](http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis) and [delete](https://github.com/conde-nast-international/copilot-markdown/blob/master/specification/0E.md#314-delete).

```
(new InlineText("Hello world!", InlineTextDelimiter::EMPHASIS))->render();
// "*Hello world!*"
```

- `new InlineText($text[, $delimiter])`
    ***text:*** string (Markdown)
    ***delimiter:*** string (`InlineTextDelimiter`) (default: `""`)

#### InlineTextDelimiter

[](#inlinetextdelimiter)

Class ConstantValueAlso known as`EMPHASIS``*`Italic, em`STRONG``**`Bold`DELETE``~~`Strikethrough, strike, del### Link

[](#link)

Generator for [links](https://github.com/conde-nast-international/copilot-markdown/blob/master/specification/0E.md#317-link).

```
(new Link("Hello world!", "https://github.com/"))->render();
// "[Hello world!](https://github.com/)"
(new Link("Hello world!", "https://github.com/", array("rel"=>"nofollow")))->render();
// "[Hello world!](https://github.com/){: rel=\"nofollow\" }"
```

- `new Link([$text, $href, $attributes])`
    ***text:*** string (Markdown) (default: `""`)
    ***href:*** string (default: `""`)
    ***attributes:*** array (default: `[]`)

### Blockquote

[](#blockquote)

Generator for [block quotes](http://spec.commonmark.org/0.27/#block-quotes).

```
(new Blockquote("Hello world!"))->render();
// "\n> Hello world!\n"
```

- `new Blockquote($text)`
    ***text:*** string (Markdown)

### ListTag

[](#listtag)

Generator for [lists](http://spec.commonmark.org/0.27/#lists).

```
(new ListTag(["First", "Second"]))->render();
// "\n\n* First\n* Second\n\n"
(new ListTag(["First", "Second"], TRUE))->render();
// "\n\n1. First\n2. Second\n\n"
```

- `new ListTag($items[, $ordered])`
    ***items:*** array (Markdown)
    ***ordered:*** boolean (default: `FALSE`)

### Embed

[](#embed)

Generator for [embeds](https://github.com/conde-nast-international/copilot-markdown/blob/master/specification/0E.md#311-embed).

```
(new Embed("https://github.com", EmbedSubtype::IFRAME))->render();
// "\n\n[#iframe: https://github.com]\n\n"
(new Embed("https://github.com", EmbedSubtype::IFRAME, "My caption."))->render();
// "\n\n[#iframe: https://github.com]|||My caption.|||\n\n"
```

- `new Embed($uri[, $subtype, $caption])`
    ***uri:*** string
    ***subtype:*** string (default: `EmbedSubtype::IFRAME`)
    ***caption:*** string (default: `""`)

#### EmbedSubtype

[](#embedsubtype)

Class constants for valid embed [subtypes](https://github.com/conde-nast-international/copilot-markdown/blob/master/specification/0E.md#3116-subtypes). See the [source file](https://github.com/conde-nast-international/copilot-markdown-generator-php/blob/master/src/EmbedSubtype.php) for reference.

See also
--------

[](#see-also)

- [Copilot-flavored Markdown](https://github.com/conde-nast-international/copilot-markdown)
- [Copilot-flavored Markdown spec](https://github.com/conde-nast-international/copilot-markdown/tree/master/specification)
- [CommonMark](http://commonmark.org/)
- [CommonMark spec](http://spec.commonmark.org/)
- [Flyway Integration API](https://conde-nast-international.github.io/flyway-api-docs)
- [Get Composer](https://getcomposer.org/)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~73 days

Total

6

Last Release

2786d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.6.0

v0.2.0PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e8d7d243c9cfa7889ca79fbe8b955df6b7fe96b6a7e9dabcdbe6f599fad8a00?d=identicon)[srilq](/maintainers/srilq)

![](https://www.gravatar.com/avatar/af21853976f9a80c9531ee0b6b3410e4fd9f163407b0d3c4bcd5eb4e48a262a9?d=identicon)[michael-zucker](/maintainers/michael-zucker)

![](https://www.gravatar.com/avatar/8270c0bbd6e24da82c8baa58ff9e230e80f8d626ccd005453fa293edfca9d14c?d=identicon)[nigelhanlon](/maintainers/nigelhanlon)

![](https://www.gravatar.com/avatar/c6aa28fd7fb9bf9bfb4146a893777248758fab50eeb87cf9aeae76304a59e2e8?d=identicon)[graycodes](/maintainers/graycodes)

---

Top Contributors

[![graycodes](https://avatars.githubusercontent.com/u/1530754?v=4)](https://github.com/graycodes "graycodes (4 commits)")[![almostagile](https://avatars.githubusercontent.com/u/2584457?v=4)](https://github.com/almostagile "almostagile (1 commits)")[![nigelhanlon](https://avatars.githubusercontent.com/u/5331111?v=4)](https://github.com/nigelhanlon "nigelhanlon (1 commits)")[![sorasu](https://avatars.githubusercontent.com/u/2067943?v=4)](https://github.com/sorasu "sorasu (1 commits)")

---

Tags

cnidcopilot-markdownmarkdownphpphp-libraryphpcomposerapiparserlibrarygeneratorconvertermarkdowncommonmarktagsintegrationcopilottugboatconverterscopilot markdowncopilot markdown generatorcopilot flavored markdowncopilot flavoured markdowngeneratermarkdown tagscopilot tagsflywayflyway integrationflyway integration apicontent parsercontent convertercontent convertersconde nastconde nast internationalcni

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/conde-nast-international-copilot-markdown-generator/health.svg)

```
[![Health](https://phpackages.com/badges/conde-nast-international-copilot-markdown-generator/health.svg)](https://phpackages.com/packages/conde-nast-international-copilot-markdown-generator)
```

###  Alternatives

[mikealmond/musicbrainz

A PHP library for accessing the MusicBrainz API

6385.1k1](/packages/mikealmond-musicbrainz)[hg/apidoc-thinkphp

thinkphp API文档自动生成

1311.8k](/packages/hg-apidoc-thinkphp)[klev-o/telegram-bot-api

Simple and convenient object-oriented implementation Telegram bot API with php version ^7.4 support. You'll like it)

457.8k1](/packages/klev-o-telegram-bot-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
