PHPackages                             cable8mm/commonmark-unfenced - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. cable8mm/commonmark-unfenced

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

cable8mm/commonmark-unfenced
============================

v1.0.0(2y ago)02.0k1MITPHPCI failing

Since Apr 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cable8mm/commonmark-unfenced)[ Packagist](https://packagist.org/packages/cable8mm/commonmark-unfenced)[ RSS](/packages/cable8mm-commonmark-unfenced/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (1)

Unfenced
========

[](#unfenced)

Unleash your fenced code.

An extension for [`league/commonmark`](https://github.com/thephpleague/commonmark/).

Installation
------------

[](#installation)

After installing the package, you will need to register the extension.

### Using `graham-campbell/markdown`

[](#using-graham-campbellmarkdown)

In your `config/markdown.php` file, add the extension somewhere after the `CommonMarkCoreExtension`:

```
  return [
      // ...
      'extensions' => [
          League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension::class,
          League\CommonMark\Extension\GithubFlavoredMarkdownExtension::class,
+         Laravel\Unfenced\UnfencedExtension::class,
      ],
  ];
```

### Manually

[](#manually)

```
use Laravel\Unfenced\UnfencedExtension;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\MarkdownConverter;

$environment = new Environment();
$environment->addExtension(new CommonMarkCoreExtension());
$environment->addExtension(new UnfencedExtension());

$converter = new MarkdownConverter($environment);
echo $converter->convert('...');
```

Usage
-----

[](#usage)

Features are enabled via the "info" string of the code fence.

Note

This extension does not include any CSS.

### Adding file names

[](#adding-file-names)

To display a file name above your code, add the `filename` attribute:

```
```php filename=src/Hello.php
// ...
```
```

[![image](https://camo.githubusercontent.com/51d8aaa5531970c75eac99f546680a10d9ab1e2c814c8ecfda56e2d756fd03c8/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f66696c656e616d652e706e67)](https://camo.githubusercontent.com/51d8aaa5531970c75eac99f546680a10d9ab1e2c814c8ecfda56e2d756fd03c8/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f66696c656e616d652e706e67)

### Adding tabs

[](#adding-tabs)

Adjacent code fences can be grouped into a tabbed view by specifying the `tab` attribute:

```
```vue tab=Vue
// ...
```

```javascript tab=React
// ...
```
```

[![image](https://camo.githubusercontent.com/396723b34998025e9ae17883fdf77f5424abcde474ab1073807cda3b88f5e094/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f7461622e706e67)](https://camo.githubusercontent.com/396723b34998025e9ae17883fdf77f5424abcde474ab1073807cda3b88f5e094/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f7461622e706e67)

You may also include the `filename` attribute, which is especially helpful when providing code samples where the file name differs depending on the language:

```
```vue tab=Vue filename=Welcome.vue
// ...
```

```javascript tab=React filename=Welcome.jsx
// ...
```
```

[![image](https://camo.githubusercontent.com/137cad5989d26bdf6f79c23240eb7b7c5ae9c2eb1a112b6b7e1279ed939f10e6/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f66696c656e616d655f7461622e706e67)](https://camo.githubusercontent.com/137cad5989d26bdf6f79c23240eb7b7c5ae9c2eb1a112b6b7e1279ed939f10e6/68747470733a2f2f636162696e65742e70616c676c652e636f6d2f636f6d6d6f6e6d61726b2d756e66656e6365642f756e66656e6365645f66696c656e616d655f7461622e706e67)

The extension will inject JavaScript into your page when tabs are used. The JavaScript enables the following features:

- It will apply an `active` class to the active tab button and tab content. You may use CSS to highlight the active tab, and hide the inactive tab content.
- If multiple tabbed sections are found, and they contain identical tab names, they will be synchronized. I.e, clicking the "React" tab in one section, will switch to that tab in all sections.
- The active tab is saved to the browsers local storage so that it persists between pages and visits.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

Unknown

Total

1

Last Release

819d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c910c874a0263a18f9f976273054cd45faa3ffbcba7891992f4ab52d0656dd93?d=identicon)[Sam Lee](/maintainers/Sam%20Lee)

---

Top Contributors

[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (10 commits)")[![cable8mm](https://avatars.githubusercontent.com/u/2672043?v=4)](https://github.com/cable8mm "cable8mm (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cable8mm-commonmark-unfenced/health.svg)

```
[![Health](https://phpackages.com/badges/cable8mm-commonmark-unfenced/health.svg)](https://phpackages.com/packages/cable8mm-commonmark-unfenced)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mnapoli/front-yaml

YAML Front matter parser

2895.7M50](/packages/mnapoli-front-yaml)[code16/sharp

Laravel Content Management Framework

79164.7k8](/packages/code16-sharp)

PHPackages © 2026

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