parent
b7eeae8626
commit
7f70681411
4 changed files with 100 additions and 3 deletions
@ -0,0 +1,90 @@ |
|||||||
|
# Parkdown |
||||||
|
– a simple recursive descent Markdown parser for PHP |
||||||
|
|
||||||
|
 |
||||||
|
|
||||||
|
## Specification |
||||||
|
|
||||||
|
### Supported block types |
||||||
|
Parkdown currently support the following block types: |
||||||
|
|
||||||
|
* codeblocks *(with the ability to specify a language for the code block)* |
||||||
|
* tables *(with alignment specification)* |
||||||
|
* paragraphs |
||||||
|
|
||||||
|
### Supported inline types |
||||||
|
Parkdown currently support the following block types: |
||||||
|
|
||||||
|
* bold text (`**bold**`) |
||||||
|
* italic text (`*italic*`) |
||||||
|
* code snippets |
||||||
|
* images (``) |
||||||
|
* links (`[link text][url or reference]`) |
||||||
|
|
||||||
|
### Additional functionality |
||||||
|
|
||||||
|
* references (`[marker]: URL`) |
||||||
|
|
||||||
|
## Examples |
||||||
|
|
||||||
|
### Paragraphs |
||||||
|
```markdown |
||||||
|
A simple paragraph can contain **bold text**, `inline codeblocks` and *italic text*. We can also link [with a direct url][https://google.com] *(i.e. to google)* |
||||||
|
or via reference to [a later defined url][massivedynamic], i we so desire. |
||||||
|
``` |
||||||
|
|
||||||
|
A simple paragraph can contain **bold text**, `inline codeblocks` and *italic text*. We can also link [with a direct url][https://google.com] *(i.e. to google)* |
||||||
|
or via reference to [a later defined url][massivedynamic], i we so desire. |
||||||
|
|
||||||
|
### Images |
||||||
|
```markdown |
||||||
|
\!\[this is an alt text\]\(https://images.unsplash.com/photo-1571171637578-41bc2dd41cd2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&h=300&w=1740&q=80\) |
||||||
|
``` |
||||||
|
|
||||||
|
 |
||||||
|
|
||||||
|
### Code blocks |
||||||
|
```markdown |
||||||
|
|
||||||
|
\`\`\`php |
||||||
|
function main(int $argc, array $argv) : int { |
||||||
|
echo "Hello World!"; |
||||||
|
|
||||||
|
return 0; |
||||||
|
} |
||||||
|
\`\`\` |
||||||
|
|
||||||
|
``` |
||||||
|
|
||||||
|
```php |
||||||
|
function main(int $argc, array $argv) : int { |
||||||
|
echo "Hello World!"; |
||||||
|
|
||||||
|
return 0; |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
### Tables |
||||||
|
```markdown |
||||||
|
| Product name | Amount | Price | |
||||||
|
|--------------|-----:----|-------:| |
||||||
|
| Football | 7 | $18,00 | |
||||||
|
| Golfball | 122 | $7,00 | |
||||||
|
| Fooseball | 355 | $1,00 | |
||||||
|
| Puck | 58 | $12,00 | |
||||||
|
``` |
||||||
|
|
||||||
|
| Product name | Amount | Price | |
||||||
|
|--------------|-----:----|-------:| |
||||||
|
| Football | 7 | $18,00 | |
||||||
|
| Golfball | 122 | $7,00 | |
||||||
|
| Fooseball | 355 | $1,00 | |
||||||
|
| Puck | 58 | $12,00 | |
||||||
|
|
||||||
|
### References |
||||||
|
|
||||||
|
```markdown |
||||||
|
[massivedynamic]: https://massivedynamic.eu |
||||||
|
``` |
||||||
|
|
||||||
|
[massivedynamic]: https://massivedynamic.eu |
@ -0,0 +1,2 @@ |
|||||||
|
This is line one. |
||||||
|
This is line two. |
Loading…
Reference in new issue