<beginfold id='1'>---</beginfold id='1'>
Title:    A Sample Markdown Document
Author:   Fletcher T. Penney
Date:     February 9, 2011
Comment:  This is a comment intended to demonstrate 
          metadata that spans multiple lines.
<endfold id='1'>---</endfold id='1'>

# H1

## H2

### H3

Multi-line paragraph bla bla bla
bla bla bla.

Intentional line break  
via two spaces at line.

Formats: _italic_, **bold**, `monospace`, ~~strikeout~~

Bullet list:

* item1
* item2

Numbered list:

1. item 1
2. item 2

Task list:

- [x] Finish my changes
- [ ] Push my commits
- [ ] Open a pull request

A link as normal text: http://example.com

[link](http://kde.org)

Auto-link: <http://kate-editor.org>
Mail: <mailto:mark@kde.org>

This is [an example](http://example.com/ "Title") inline link.

See my [About](/about/) page for details.

This is [an example] [id] reference-style link.

[id]: http://example.com/  "Optional Title Here"
[foo]: http://example.com/ 'Optional Title Here'
[bar]: http://example.com/ (Optional Title Here)
[id2]: <http://example.com/>  "Optional Title Here"

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")

[![Alt text](https://url/to/img.svg)](https://link.com/example/)

    code 1
    code 2

normal text

> block quote _italic_
> more block quote

normal text

Title: some text

normal text

# Lists

1. item
   * This is a list item
     with multiple lines.
     <beginfold id='2'></beginfold id='2'>```
     code
     <endfold id='2'>```</endfold id='2'>

     > This is a
     blockquote

     This is a new paragraph, which
     is part of the item in the
     previous list.

         indented code block

       Other paragraph.

     * subitem
       * subitem
         with multiple
            lines.

         New paragraph of
         the previous subitem.

             code block

          -----------------------

            Other paragraph of
            the subitem.

          30. numlist item
          31. numlist item

                 New paragraph of
                 the previous item.

                 > Blockquote

                  code block
  
              Other paragraph.

# Inline HTML

&copy;
<strong>bold</strong>
<code>code</code>

<beginfold id='3'><table</beginfold id='3'>>
    <tr>
        <th>a</th>
        <th>b</th>
    </tr>
    <tr>
        <th><beginfold id='4'><ul</beginfold id='4'>>
            <li>c</li>
            <li>d</li>
        <endfold id='4'></ul</endfold id='4'>></th>
        <th>e</th>
    </tr>
<endfold id='3'></table</endfold id='3'>>

normal text *italic*

# Code

`simple code`

``simple ` code``

```simple `` ` code ```

````simple`code````

normal text
    normal text
    normal text
        normal text

    code blocks are only allowed
    after an empty line.

* list
    list
    
    normal text
    
1. num-list
    num-list

    normal text

> quote
    quote
    
    code block

normal
<beginfold id='5'><!--</beginfold id='5'> comment <endfold id='5'>--></endfold id='5'>
    <!-- code, not comment -->
    code

normal

<beginfold id='5'>  <!--</beginfold id='5'> coment <endfold id='5'>--></endfold id='5'>
    code

# Fenced code blocks (bug 356974)

## Bash

<beginfold id='2'></beginfold id='2'>```bash
#!/usr/bin/env bash

for f in *; <beginfold id='6'>do</beginfold id='6'>
    echo "$f"
<endfold id='6'>done</endfold id='6'>
<endfold id='2'>```</endfold id='2'>

## C++

<beginfold id='2'></beginfold id='2'>```cpp
#include <QtCore/QObject>

class Q : public QObject <beginfold id='7'>{</beginfold id='7'>
Q_OBJECT
public:
    Q();
<endfold id='7'>}</endfold id='7'>

Q::Q() :QObject(NULL) <beginfold id='7'>{</beginfold id='7'>
<endfold id='7'>}</endfold id='7'>
<endfold id='2'>```</endfold id='2'>

## C

<beginfold id='2'></beginfold id='2'>```c
#include <stdio.h>
#include "stdint.h"
#define SOME_VAR 1

static uint64_t intWithSuffix = 42ull + ~1233L;
static int octNum = 07232;
<endfold id='2'>```</endfold id='2'>

## C#  ##

<beginfold id='2'></beginfold id='2'>```csharp
var arr = new[] <beginfold id='8'>{</beginfold id='8'> 0, 1, 2, 3, 4 <endfold id='8'>}</endfold id='8'>;
var anon = new <beginfold id='8'>{</beginfold id='8'> Country = "Germany", Inhabitants = 80000000 <endfold id='8'>}</endfold id='8'>;
<endfold id='2'>```</endfold id='2'>

## CMake

<beginfold id='2'></beginfold id='2'>```cmake
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

project (hello_world)

set(QT_MIN_VERSION "5.6.0")
<endfold id='2'>```</endfold id='2'>

## CSS

<beginfold id='2'></beginfold id='2'>```css
h1.main::hover <beginfold id='9'>{</beginfold id='9'>
    font-size: 100;
    color: green;
<endfold id='9'>}</endfold id='9'>
<endfold id='2'>```</endfold id='2'>

## Email

<beginfold id='2'></beginfold id='2'>```email
From: Konqi Dragon <konqi@kde.org>
To: All <all@kde.og>
Subject: highlights
<endfold id='2'>```</endfold id='2'>

## Go

<beginfold id='2'></beginfold id='2'>```go
package main

import "fmt"

func main() <beginfold id='10'>{</beginfold id='10'>
  fmt.Println("Hola, mundo.")
<endfold id='10'>}</endfold id='10'>
<endfold id='2'>```</endfold id='2'>

## Haskell

<beginfold id='2'></beginfold id='2'>```haskell
module Main (main) where

main :: IO ()
main = putStrLn "Hello, World!"
<endfold id='2'>```</endfold id='2'>

## HTML

<beginfold id='2'></beginfold id='2'>```html
<html>
  <body>
    <p class="main">Hello world!</p>
  </body>
</html>
<endfold id='2'>```</endfold id='2'>

## Java

<beginfold id='2'></beginfold id='2'>```java
package fibsandlies;
import java.util.HashMap;

<beginfold id='11'>/**</beginfold id='11'>
 * This is an example of a Javadoc comment; Javadoc can compile documentation
 * from this text. Javadoc comments must immediately precede the class, method, or field being documented.
 <endfold id='11'>*/</endfold id='11'>
public class FibCalculator extends Fibonacci implements Calculator <beginfold id='12'>{</beginfold id='12'>

    private static Map<Integer, Integer> memoized = new HashMap<Integer, Integer>();
    public static void main(String[] args) <beginfold id='12'>{</beginfold id='12'>
        memoized.put(1, 1);
        memoized.put(2, 1);
        System.out.println(fibonacci(12));
    <endfold id='12'>}</endfold id='12'>
<endfold id='12'>}</endfold id='12'>
<endfold id='2'>```</endfold id='2'>

## JavaScript

<beginfold id='2'></beginfold id='2'>```js
function factorial(n) <beginfold id='13'>{</beginfold id='13'>
    if (n === 0) <beginfold id='13'>{</beginfold id='13'>
        return 1;  // 0! = 1
    <endfold id='13'>}</endfold id='13'>
    return n * factorial(n - 1);
<endfold id='13'>}</endfold id='13'>
<endfold id='2'>```</endfold id='2'>

## JavaScript React (JSX)

<beginfold id='2'></beginfold id='2'>```jsx
<beginfold id='14'><hello</beginfold id='14'> <endfold id='14'>/></endfold id='14'>
function Story(props) <beginfold id='15'>{</beginfold id='15'>
  const SpecificStory = components<beginfold id='16'>[</beginfold id='16'>props.storyType<endfold id='16'>]</endfold id='16'>;
  return <beginfold id='17'><SpecificStory</beginfold id='17'> story=<beginfold id='18'>{</beginfold id='18'> props.story <endfold id='18'>}</endfold id='18'> attr2="&ref;" attr3="Hello\n" <endfold id='17'>/></endfold id='17'>;
<endfold id='15'>}</endfold id='15'>
<endfold id='2'>```</endfold id='2'>

## JSON

<beginfold id='2'></beginfold id='2'>```json
<beginfold id='19'>[</beginfold id='19'><beginfold id='20'>{</beginfold id='20'>
    "hello": "world",
    "count": 1,
    "bool": true
<endfold id='20'>}</endfold id='20'><endfold id='19'>]</endfold id='19'>
<endfold id='2'>```</endfold id='2'>

## Matlab

<beginfold id='2'></beginfold id='2'>```matlab
% Numbers _____________________________________________
5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i
5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i'
<endfold id='2'>```</endfold id='2'>

## Markdown

<beginfold id='2'></beginfold id='2'>```markdown
**bold** `code`
> quote

<endfold id='2'>```</endfold id='2'>

## Mustache/Handlebars

<beginfold id='2'></beginfold id='2'>```handlebars
<beginfold id='21'>{{#movie</beginfold id='21'>}}
    <beginfold id='22'><div</beginfold id='22'>>
        <h1>{{title}}</h1>
        <img src="{{poster}}" alt="{{title}}"/>
    <endfold id='22'></div</endfold id='22'>>
    <beginfold id='22'><div</beginfold id='22'>>
        Rating - {{ratings.critics_rating}}
    <endfold id='22'></div</endfold id='22'>>
<endfold id='21'>{{/movie}}</endfold id='21'>
<endfold id='2'>```</endfold id='2'>

## Perl

<beginfold id='2'></beginfold id='2'>```perl
my $var = shift;

$var =~ s<beginfold id='23'>/</beginfold id='23'>bla<endfold id='23'></endfold id='23'><beginfold id='24'>/</beginfold id='24'>foo<endfold id='24'>/igs</endfold id='24'>;
$var =~ s<beginfold id='23'>!</beginfold id='23'>bla<endfold id='23'></endfold id='23'><beginfold id='24'>!</beginfold id='24'>foo<endfold id='24'>!igs</endfold id='24'>;
$var =~ s<beginfold id='23'>#</beginfold id='23'>bla<endfold id='23'></endfold id='23'><beginfold id='24'>#</beginfold id='24'>foo<endfold id='24'>#igs</endfold id='24'>;
<endfold id='2'>```</endfold id='2'>

## PHP

<beginfold id='2'></beginfold id='2'>```php
namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;

class IndexController extends AbstractActionController
<beginfold id='25'>{</beginfold id='25'>
<endfold id='25'>}</endfold id='25'>
<endfold id='2'>```</endfold id='2'>

## Python

<beginfold id='2'></beginfold id='2'>```python
def addXToY<beginfold id='26'>(</beginfold id='26'>x, y<endfold id='26'>)</endfold id='26'>:
    total = x + y
    print total
<endfold id='2'>```</endfold id='2'>

## QML

<beginfold id='2'></beginfold id='2'>```qml
Text <beginfold id='27'>{</beginfold id='27'>
    id: hello
    width: 100
    text: "Hello world!"
<endfold id='27'>}</endfold id='27'>
<endfold id='2'>```</endfold id='2'>

## R

<beginfold id='2'></beginfold id='2'>```r
# Declare function “f” with parameters “x”, “y“
# that returns a linear combination of x and y.
f <- function(x, y) <beginfold id='28'>{</beginfold id='28'>
  z <- 3 * x + 4 * y
  return(z)
<endfold id='28'>}</endfold id='28'>
<endfold id='2'>```</endfold id='2'>

## Raku

<beginfold id='2'></beginfold id='2'>```raku
grammar Parser <beginfold id='29'>{</beginfold id='29'>
    rule  TOP  <beginfold id='30'>{</beginfold id='30'> I <love> <lang> <endfold id='30'>}</endfold id='30'>
    token love <beginfold id='30'>{</beginfold id='30'> '♥' | love <endfold id='30'>}</endfold id='30'>
    token lang <beginfold id='30'>{</beginfold id='30'> < Raku Perl Rust Go Python Ruby > <endfold id='30'>}</endfold id='30'>
<endfold id='29'>}</endfold id='29'>

say Parser.parse: 'I ♥ Raku';

say 1 #`<beginfold id='31'>«««</beginfold id='31'> blah TODO blah
here? <endfold id='31'>»»»</endfold id='31'> 2 ;
say 1 #` ( blah TODO blah
2 ;
rx<beginfold id='30'>-</beginfold id='30'> regex <endfold id='30'>-</endfold id='30'>
<endfold id='2'>```</endfold id='2'>

## Ruby

<beginfold id='2'></beginfold id='2'>```ruby
require 'Config'
  <beginfold id='32'>def</beginfold id='32'> CGI::escape(string)
    string.gsub(/([^ a-zA-Z0-9_.-]+)/n) <beginfold id='32'>do</beginfold id='32'>
      '%' + $1.unpack('H2' * $1.size).join('%').upcase
    <endfold id='32'>end</endfold id='32'>.tr(' ', '+')
  <endfold id='32'>end</endfold id='32'>
<endfold id='2'>```</endfold id='2'>

## Rust

<beginfold id='2'></beginfold id='2'>```rust
fn main() <beginfold id='33'>{</beginfold id='33'>
    println!("Hello world!");
<endfold id='33'>}</endfold id='33'>
<endfold id='2'>```</endfold id='2'>

## MySQL

<beginfold id='2'></beginfold id='2'>```mysql
-- comment
CREATE TABLE stuff COLUMNS(col1 INT, col2 Varchar);
SELECT * FROM stuff WHERE id = 'string';
select * from stuff where id < 0.42;
Select col1, col2 From stuff Where stuff.col1 IS NOT NuLL;
<endfold id='2'>```</endfold id='2'>

## TypeScript

<beginfold id='2'></beginfold id='2'>```ts
class Student <beginfold id='34'>{</beginfold id='34'>
    fullName: string;
    constructor(public firstName: string, public middleInitial: string, public lastName: string) <beginfold id='34'>{</beginfold id='34'>
        this.fullName = firstName + " " + middleInitial + " " + lastName;
    <endfold id='34'>}</endfold id='34'>
<endfold id='34'>}</endfold id='34'>
<endfold id='2'>```</endfold id='2'>

## XML

<beginfold id='2'></beginfold id='2'>```xml
<beginfold id='35'><tag</beginfold id='35'> attribute="3">
  <beginfold id='35'><nested</beginfold id='35'><endfold id='35'>/></endfold id='35'>
</tag<endfold id='35'>></endfold id='35'>
<endfold id='2'>```</endfold id='2'>

## reStructuredText

<beginfold id='2'></beginfold id='2'>```rst
Section Header
==============

.. image:: /path/to/image.jpg

- A bullet list item
<endfold id='2'>```</endfold id='2'>

## Doxygen

<beginfold id='2'></beginfold id='2'>```doxygen
a normal member taking two arguments and returning an integer value.
@param a an integer argument.
@param s a constant character pointer.
@see Javadoc_Test()
@see publicVar()
@return The test results
<endfold id='2'>```</endfold id='2'>

## No language specified

<beginfold id='2'></beginfold id='2'>```
No language is specified, but it should be still rendered as code block.
<endfold id='2'>```</endfold id='2'>

# Fenced code blocks with more than 3 backticks or tildes

<beginfold id='2'></beginfold id='2'>~~~
Fenced code block with 3 tildes.
<endfold id='2'>~~~</endfold id='2'>

<beginfold id='2'></beginfold id='2'>`````````
Some implementations of Markdown/MultiMarkdown support more than 3 backticks or tildes.
```
The block ends with the same amount of backticks.
<endfold id='2'>`````````</endfold id='2'>

<beginfold id='2'></beginfold id='2'>~~~~~~~~~~~~
Fenced code block with more tildes.
<endfold id='2'>~~~~~~~~~~~~</endfold id='2'>

## With languages

<beginfold id='2'></beginfold id='2'>```````html
<html>
  <body>
    <p class="main">Hello world!</p>
  </body>
</html>
``` <beginfold id='36'><!--</beginfold id='36'> <= doesn't end here <endfold id='36'>--></endfold id='36'>
<endfold id='2'>```````</endfold id='2'>

<beginfold id='2'></beginfold id='2'>~~~bash
for f in *; <beginfold id='6'>do</beginfold id='6'>
    echo "$f"
<endfold id='6'>done</endfold id='6'>
<endfold id='2'>~~~</endfold id='2'>

<beginfold id='2'></beginfold id='2'>~~~~~~~~~python
def addXToY<beginfold id='26'>(</beginfold id='26'>x, y<endfold id='26'>)</endfold id='26'>:
    total = x + y
    print total
~~~ # <= doesn't end here
<endfold id='2'>~~~~~~~~~</endfold id='2'>

# Italic and bold text

**b** *i* __b__ _i_
***ib*** ___ib___
**_ib_** __*ib*__

* _italic_ **bold** ***ib*** ~~strikeout~~

> _italic_ **bold** ***ib*** ~~strikeout~~

## Bold
**bold*___text** normal
__bold_***text__ normal

## Italic
*italic _ text* normal
_italic * text_ normal

## Italic-Bold
***italic-bold ** italic-bold*** normal
***bold-italic text **bold-italic text*** normal
***bold*italic*** normal
**_bold-italic text_** normal

<beginfold id='5'><!--</beginfold id='5'> A non-space character is required after or before * or _ <endfold id='5'>--></endfold id='5'>
_ normal text_ * normal text *
*italic text*normal text*
*italic text *italic text*
**bold text**normal text**
**bold text **bold text**

<beginfold id='5'><!--</beginfold id='5'> A delimiter is required after or before _ <endfold id='5'>--></endfold id='5'>
aaa**bold text**aaaaa
aaa__normal text__aaaaa
пристаням_стремятся_

<beginfold id='5'><!--</beginfold id='5'> Escapes within bold or italic text <endfold id='5'>--></endfold id='5'>
\*normal text*
_normal text\_
**italic text\**
***only bold\***
**bold\** bold**
