2017 © Pedro Peláez
 

library gitdown

Markdown parser for PHP based on the CommonMark spec with integration into git

image

skizu/gitdown

Markdown parser for PHP based on the CommonMark spec with integration into git

  • Saturday, September 19, 2015
  • by Skizu
  • Repository
  • 2 Watchers
  • 0 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

skizu/gitdown

skizu/gitdown combines git repos with a Markdown parser for PHP which supports the full CommonMark spec, (*1)

Goals

  • Fully support the CommonMark spec (100% compliance)
  • Provide an extensible git library integration component
  • To be able to load, compare and parse versions of MarkDown files within a git repo

Installation

This project can be installed via Composer:, (*2)

``` bash $ composer require skizu/gitdown, (*3)


## Basic Usage The `GitDownConverter` class provides a simple wrapper for converting [CommonMark] files within a [git] repo to HTML: ```php use Skizu\GitDown\GitDownConverter; $gitDownConverter = new GitDownConverter('/path/to/repo'); echo $gitDownConverter->convertToHtml('path/to/file.md'); //

Hello World!

The GitDownDiff class provides a simple wrapper for performing diffs on CommonMark files within a git repo:, (*4)

use Skizu\GitDown\GitDownDiff

$gitDownDiff = new GitDownDiff('/path/to/repo');
$diff = $gitDownDiff->getDiff('master@{2 days ago}..master');

foreach($diff as $file => $data) {
   echo '<h1>'.$file.'<h1>';
   foreach($data['lines'] as $line) {
      echo $line;
   }
}

// <h1>README.md</h1>
// -* Fully support the CommonMark spec (100% compliance)\n
// +* Fully support the [CommonMark spec] (100% compliance)\n 

The Versions

19/09 2015

dev-master

9999999-dev https://github.com/skizu/gitdown

Markdown parser for PHP based on the CommonMark spec with integration into git

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

parser git markdown commonmark gitdown

19/09 2015

dev-develop

dev-develop https://github.com/skizu/gitdown

Markdown parser for PHP based on the CommonMark spec with integration into git

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

parser git markdown commonmark gitdown

14/09 2015

V1.0

1.0.0.0 https://github.com/skizu/gitdown

Markdown parser for PHP based on the CommonMark spec with integration into git

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

parser git markdown commonmark gitdown