Skip to content

thar0x29a/pandocfilters-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Note!!

This ist just a fork. I fixed the issues with the original quick and dirty and will not give any maintainance or support for it. Maybe I shall write my own version this days.

PHP pandocfilters

This is a PHP port of the python module for writing pandoc filters found at https://github.com/jgm/pandocfilters

The purpose is simply to make it easier to write filters in PHP

#!/usr/bin/env php
<?php

require_once __DIR__ . '/../pandocfilters.php';

Pandoc_Filter::toJSONFilter(function ($type, $value, $format, $meta) {
    if ('Str' == $type) {
        // use mb_convert_case instead of ucwords so filter works with unicode
        return mb_convert_case($value, MB_CASE_TITLE, "UTF-8");
    }
});

More examples and more information can be found in the original repository. Dave Jarvis has opened a PR with a bit more information. Until it is merged it can be found here:
https://github.com/DaveJarvis/pandocfilters/tree/patch-1

Thanks to John MacFarlane for pandoc.

About

Fixed Version of the original pandocfilters-php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%