Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

n0sz/commonmark-marker-extension

This library adds support of highlighted text (<mark> HTML tag) to league/commonmark

Installation

This project can be installed via composer:

composer require n0sz/commonmark-marker-extension

Usage

use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use N0sz\CommonMark\Marker\MarkerExtension;


$environment->addExtension(new CommonMarkCoreExtension());
$environment->addExtension(new MarkerExtension());

Syntax

Code:

==Marker== on the left

Marker on the ==right==

==Marker everywhere==

Result:

<p><mark>Marker</mark> on the left</p>

<p>Marker on the <mark>right</mark></p>

<p><mark>Marker everywhere</mark></p>

About

Adds Text highlighting support to CommonMark PHP implementation

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages