<commit_before># faml - A Markdown Language (v0.9)
`faml` is a simple markup language to give users basic text formatting. It is not intended to allow the full feature set of HTML (for that, look into [Markdown](http://daringfireball.net/projects/markdown/syntax), which supports inline-HTML) but instead a small, but useful set of common features.

`faml` is inspired by Markdown and [CommonMark](http://commonmark.org/) but is not intended to be compatible or a replacement - `faml` is its own markup language with its own focus of basic text formatting.

The `faml.js` reference implementation contains a parser and an HTML renderer. The examples below include the output of the reference renderer, but users can create their own renderers. Also, linebreaks (`\n`) have been added for readability in this document.

# Language Specification
## New Lines and Paragraphs
A newline is translated into a linebreak. More than one newline is translated into a single paragraph. `faml` implementation implicitly surrounds the entire input into a paragraph. Carriage returns (`\r`) are removed from the input. 

    Input:
    Line One
    Line Two

    Output:
    <p>Line One<br/>
    Line Two</p>

    Input:
    Line One

    Line Two

    Output:
    <p>Line One</p>
    <p>Line Two</p>

    Input:
    Line One


    Line Two

    Output:
    <p>Line One</p>
    <p>Line Two</p>

## HTML
`faml` does not allow any HTML. All input is HTML Encoded before it's being parsed.

    Input:
    It is true that 3<5 and 5>3. <3 Math :) Sad that they depreciated <blink>blink</blink> tags. I liked them.

    Output:
    <p>It is true that 3&lt;5 and 5&gt;3. &lt;3 Math :) Sad that they depreciated &lt;blink&gt;blink&lt;/blink&gt; tags. I liked them.</p>

## Emphasis and Strong Emphasis (Italic and Bold)
Text surrounded with single asterisks is emphasis, usually rendered italic:

    Input:
    This is *emphasized text*.

	Output:
    <p>This is <em>emphasized text</em>.</p>

Text surrounded with double asterisks is strong emphasis, usually rendered bold:

    Input:
    This is **strongly emphasized text**.

    Output:
    <p>This is <strong>strongly emphasized text</strong>.</p>

Text surrounded with triple asterisks is emphasized strong emphasis, usually rendered italic and bold:

    Input:
    This is ***emphasized strong emphasis***.

    Output:
    <p>This is <em><strong>emphasized strong emphasis</strong></em>.</p>

If you have more than three asterisks, the asterisks are taken as a literal.

    Input:
    *****Five Stars!*****

    Output:
    <p>*****Five Stars!*****</p>

## Escaping
If you need a literal character, prefix it with a backslash. To display a backslash that precedes a character that needs escaping, escape it with another backslash.

    Input:
    This is *Emphasis containing an asterisk, like this: \**.

    Output:
    <p>This is <em>Emphasis containing an asterisk, like this: *</em>.</p>

    Input:
    This is a backslash: \.

    Output:
    <p>This is a backslash: \.</p>

	Input:
    This is a backslash with emphasised text: \\*Hello!*.

    Output:
    <p>This is a backslash with emphasised text: \<em>Hello!</em>.</p>

## HTML Entities
HTML Entities do not have to be explicitly escaped.

    Input:
    Clever & Smart

    &nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; &ClockwiseContourIntegral;

    Output:
    <p>Clever &amp; Smart</p>
    <p>&nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; &ClockwiseContourIntegral;</p>

## Headings
Up to six levels of headings can be created by starting a line with one to six \# (hash) sign, a space, and the text. The \# sign must be the first character in a line.

    Input:
    # Heading 1
    ## Heading 2
    ### Heading 3
    #### Heading 4
    ##### Heading 5
    ###### Heading 6 - any formatting (like **this**) is taken as a literal
    #Missing Space
     # Not the first character in the line

    Output:
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6 - any formatting (like **this**) is taken as a literal</h6>
    <p>#Missing Space<br/>
     # Not the first character in the line</p>

## Code/Pre Blocks
You can include inline code blocks by surrounding it with backticks (\`) - the key left of the `1` on a US Keyboard.

    Input:
    This is `an inline code block` in the text.

    Output:<commit_msg>Headers allow inline formatting<commit_after># faml - A Markdown Language (v0.9)
`faml` is a simple markup language to give users basic text formatting. It is not intended to allow the full feature set of HTML (for that, look into [Markdown](http://daringfireball.net/projects/markdown/syntax), which supports inline-HTML) but instead a small, but useful set of common features.

`faml` is inspired by Markdown and [CommonMark](http://commonmark.org/) but is not intended to be compatible or a replacement - `faml` is its own markup language with its own focus of basic text formatting.

The `faml.js` reference implementation contains a parser and an HTML renderer. The examples below include the output of the reference renderer, but users can create their own renderers. Also, linebreaks (`\n`) have been added for readability in this document.

# Language Specification
## New Lines and Paragraphs
A newline is translated into a linebreak. More than one newline is translated into a single paragraph. `faml` implementation implicitly surrounds the entire input into a paragraph. Carriage returns (`\r`) are removed from the input. 

    Input:
    Line One
    Line Two

    Output:
    <p>Line One<br/>
    Line Two</p>

    Input:
    Line One

    Line Two

    Output:
    <p>Line One</p>
    <p>Line Two</p>

    Input:
    Line One


    Line Two

    Output:
    <p>Line One</p>
    <p>Line Two</p>

## HTML
`faml` does not allow any HTML. All input is HTML Encoded before it's being parsed.

    Input:
    It is true that 3<5 and 5>3. <3 Math :) Sad that they depreciated <blink>blink</blink> tags. I liked them.

    Output:
    <p>It is true that 3&lt;5 and 5&gt;3. &lt;3 Math :) Sad that they depreciated &lt;blink&gt;blink&lt;/blink&gt; tags. I liked them.</p>

## Emphasis and Strong Emphasis (Italic and Bold)
Text surrounded with single asterisks is emphasis, usually rendered italic:

    Input:
    This is *emphasized text*.

	Output:
    <p>This is <em>emphasized text</em>.</p>

Text surrounded with double asterisks is strong emphasis, usually rendered bold:

    Input:
    This is **strongly emphasized text**.

    Output:
    <p>This is <strong>strongly emphasized text</strong>.</p>

Text surrounded with triple asterisks is emphasized strong emphasis, usually rendered italic and bold:

    Input:
    This is ***emphasized strong emphasis***.

    Output:
    <p>This is <em><strong>emphasized strong emphasis</strong></em>.</p>

If you have more than three asterisks, the asterisks are taken as a literal.

    Input:
    *****Five Stars!*****

    Output:
    <p>*****Five Stars!*****</p>

## Escaping
If you need a literal character, prefix it with a backslash. To display a backslash that precedes a character that needs escaping, escape it with another backslash.

    Input:
    This is *Emphasis containing an asterisk, like this: \**.

    Output:
    <p>This is <em>Emphasis containing an asterisk, like this: *</em>.</p>

    Input:
    This is a backslash: \.

    Output:
    <p>This is a backslash: \.</p>

	Input:
    This is a backslash with emphasised text: \\*Hello!*.

    Output:
    <p>This is a backslash with emphasised text: \<em>Hello!</em>.</p>

## HTML Entities
HTML Entities do not have to be explicitly escaped.

    Input:
    Clever & Smart

    &nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; &ClockwiseContourIntegral;

    Output:
    <p>Clever &amp; Smart</p>
    <p>&nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; &ClockwiseContourIntegral;</p>

## Headings
Up to six levels of headings can be created by starting a line with one to six \# (hash) sign, a space, and the text. The \# sign must be the first character in a line.

    Input:
    # Heading 1
    ## Heading 2
    ### Heading 3
    #### Heading 4
    ##### Heading 5
    ###### Heading 6 - Inline formatting (like *this*) or [links](http://example.com) are supported
    #Missing Space
     # Not the first character in the line

    Output:
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6 - Inline formatting (like <em>this</em>) or <a href="http://example.com">links</a> are supported</h6>
    <p>#Missing Space<br/>
     # Not the first character in the line</p>

## Code/Pre Blocks
You can include inline code blocks by surrounding it with backticks (\`) - the key left of the `1` on a US Keyboard.

    Input:
    This is `an inline code block` in the text.

    Output:
{'fraction_non_alphanumeric': 0.10818908122503329, 'fraction_numerical': 0.009098979138925876, 'mean_word_length': 3.2334429309534993, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 129, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122143', 'n_tokens_mistral': 2926, 'n_tokens_neox': 2732, 'n_words': 1165}