Usage
$ composer clearcache
$ composer require psmolic/bfmd, (*1)
use BFMD\Parser
...
$parser = new Parser();
$string = $parser->parseToHTML($markdownString);
Task:
Our main dish is a Parser for BFMD (Broccoli flavored MarkDown).
The task is to create a parser that takes a given input and converts it to some output using some of the standard MarkDown components and some special flavor., (*2)
That said, BFMD has the following components:, (*3)
The paragraph behaviour is the same as in the normal MarkDown (Read up on it here)
linked text that will be converted to linked text, (*4)
Some text that will be converted to
Some text
Some text #2 that will be converted to
Some text #2
EAT that will be converted to
Just take this example input to test your parser., (*5)
INPUT:, (*6)
# Broccoli
Broccoli is an edible green plant in the cabbage family whose large flowerhead is eaten as a vegetable.
## Etymology
The word broccoli comes from the Italian plural of broccolo, which means "the flowering crest of a cabbage", and is the diminutive form of brocco, meaning "small nail" or "sprout". Broccoli is often boiled or steamed but may be eaten raw.
Having this said, you can read up on it even more [here](https://en.wikipedia.org/wiki/Broccoli). Also be sure to checkout this wonderful picture of one.
___EAT___
OUTPUT:, (*7)
Broccoli
Broccoli is an edible green plant in the cabbage family whose large flowerhead is eaten as a vegetable., (*8)
Etymology
The word broccoli comes from the Italian plural of broccolo, which means "the flowering crest of a cabbage", and is the diminutive form of brocco, meaning "small nail" or "sprout". Broccoli is often boiled or steamed but may be eaten raw., (*9)
Having this said, you can read up on it even more here. Also be sure to checkout this wonderful picture of one.
, (*10)
Your settings are as follows:
You will have to create a composer package
You can use PHP features up to version 5.5
Your file/folder structure needs to follow the PSR-4 standard, with a base namespace of BFMD
Optional: You use packagist to distribute your BFMD-Parser, so we could easily use it in our project, (*11)