2017 © Pedro Peláez
 

symfony-bundle markdownify-bundle

Symfony2 bundle that integrates the Markdownify class as a service

image

pk/markdownify-bundle

Symfony2 bundle that integrates the Markdownify class as a service

  • Wednesday, December 16, 2015
  • by pkruithof
  • Repository
  • 1 Watchers
  • 3 Stars
  • 64,792 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 2 Forks
  • 2 Open issues
  • 7 Versions
  • 9 % Grown

The README.md

NOTE: This project is deprecated and will be archived!

When Symfony was in version 2 (and later 3) this bundle made a lot more sense than it does now. With the introduction of Symfony 4, bundles become less and less important. Furthermore, this bundle mainly adds a service, which you can easily configure in your Symfony application. You don't need a bundle for that., (*1)

For these reasons, the project is deprecated and will be archived in some time. If you are using this, please consider removing it and configure the service like this:, (*2)

services:
  markdownify:
    class: Markdownify\ConverterExtra
    arguments: [] # optionally specify some arguments    

Original readme:

Provides Symfony integration for the Markdownify/Markdownify_Extra scripts., (*3)

The original Markdownify from Milian Wolff has been refactored by myself (see modifications) and later by Pixel418., (*4)

The latter is now merged back into this bundle as a dependency, so that the ongoing development in that repo is also available in this bundle., (*5)

Requirements

The bundle is built for Symfony 2.7 and up. It should work on older versions, but they are not supported., (*6)

Installation

php composer.phar require "pk/markdownify-bundle:^4.0"

AppKernel.php

Add to app/AppKernel.php:, (*7)

new PK\MarkdownifyBundle\PKMarkdownifyBundle()

Configuration

The configuration is optional as all options have defaults., (*8)

pk_markdownify:
  # Where to put the link references:
  # * 0 for after the content (default)
  # * 1 for after each paragraph
  # * 2 for in the paragraph, directly after the link text
  link_position: 0

  # When larger than the minimal width (25), the body will be
  # wrapped to this width. Set to false to disable wrapping (default)
  body_width: false

  # Whether to keep html tags which cannot be converted to markdown
  keep_html: false

Usage

The bundle registers a markdownify service. Use it as you would use the Markdownify class:, (*9)

$converter = $container->get('markdownify');
$converter->parseString('<h1>Heading</h1>');
// Returns: # Heading

NOTE: Before version 3.0, the Markdownify classes were included in this bundle, which had a different namespace than the \Markdownify one used currently. If you use this namespace somewhere in your code, be sure to update them when upgrading to 3.0., (*10)

Modifications

The following modifications have been applied to the original Markdownify code., (*11)

  • PSR 0 to 2 coding standards fix
  • Organised properties and methods (properties first, then methods)

License

The MIT License (MIT). Please see License File for more information., (*12)

Credits

The Versions

16/12 2015

dev-master

9999999-dev http://github.com/pkruithof/markdownify-bundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown markdownify

16/12 2015

v4.0.0

4.0.0.0 http://github.com/pkruithof/markdownify-bundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown markdownify

21/11 2014

v3.0.1

3.0.1.0 http://github.com/pkruithof/MarkdownifyBundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown markdownify

26/09 2014

v3.0.0

3.0.0.0 http://github.com/pkruithof/MarkdownifyBundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

The Development Requires

markdown markdownify

10/06 2013

v2.1.2

2.1.2.0 http://github.com/pkruithof/MarkdownifyBundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

LGPL

The Requires

 

markdown markdownify

15/02 2013

v2.1.0

2.1.0.0 http://github.com/pkruithof/MarkdownifyBundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

markdown markdownify

15/02 2013

v2.1.1

2.1.1.0 http://github.com/pkruithof/MarkdownifyBundle

Symfony2 bundle that integrates the Markdownify class as a service

  Sources   Download

MIT

The Requires

 

markdown markdownify