<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# This file contains test data to rst2html5 in the form:
# case = {'rst': rst_text, 'out': expected_output, ...}

from __future__ import unicode_literals

indentation = {
    'rst': 'Paragraph',
    'out': '\n    <p>Paragraph</p>\n',
    'indent_output': True
}

title = {
    'rst': 'Title\n=====',
    'out': '<h1>Title</h1>'
}


title_accented_chars = {
    'rst': 'Título com Acentuação\n'
           '=====================',
    'out': '<h1>Título com Acentuação</h1>'
}

title_2 = {
        'rst': '''
Level 1
=======

some text

Level 1 Again
=============''',
    'out': '<a id="level-1"></a><section><h1>Level 1</h1><p>some text</p></section>'
           '<a id="level-1-again"></a><section><h1>Level 1 Again</h1></section>',

}


title_3 = {
    'rst': '''
=======
Level 1
=======

some text. Link to `Level 3`_

.. _section 2:

Level 2
=======

more text

Level 3
--------

link to `section 2`_''',
    'out': '''
    <h1>Level 1</h1>
    <p>some text. Link to <a href="#level-3">Level 3</a></p>
    <a id="level-2"></a>
    <a id="section-2"></a>
    <section>
        <h2>Level 2</h2>
        <p>more text</p>
        <a id="level-3"></a>
        <section>
            <h3>Level 3</h3>
            <p>link to <a href="#section-2">section 2</a></p>
        </section>
    </section>
''',
    'indent_output': True,
}


subtitle = {
    'rst': '''
================
 Document Title
================
----------
 Subtitle
----------

Section Title
=============

...''',
    'out': '<hgroup><h1>Document Title</h1><h2>Subtitle</h2></hgroup>'
           '<a id="section-title"></a><section><h1>Section Title</h1><p>...</p></section>',
}


'''
The subtitle processing should deal with indentation
'''
subtitle_2 = {
        'rst': '''
================
 Document Title
================
----------
 Subtitle
----------

Section Title
=============

...''',
        'out': '''
    <hgroup>
        <h1>Document Title</h1>
        <h2>Subtitle</h2>
    </hgroup>
    <a id="section-title"></a>
    <section>
        <h1>Section Title</h1>
        <p>...</p>
    </section>
''',
        'indent_output': True,
}


paragraph = {
        'rst': 'Lorem    ipsum dolor sit amet,        consectetur '
               'adipiscing          elit.\n'
                'Vestibulum    dignissim lacinia blandit. Suspendisse potenti.',
        'out': '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. '
               'Vestibulum dignissim lacinia blandit. Suspendisse potenti.</p>'
}


accented_paragraph = {
        'rst': 'Não há ninguém que ame a dor por si só, que a busque e '
              'queira tê-la, simplesmente por ser dor...',
        'out': '<p>Não há ninguém que ame a dor por si só, que a busque e '
               'queira tê-la, simplesmente por ser dor...</p>'
}


quoted_paragraph = {
        'rst': '''This is a paragraph.  It's   quite
short.

   This paragraph will result in an indented block of
   text, typically used for quoting other text.

This is another one.''',
        'out': "<p>This is a paragraph. It's quite short.</p>"
               "<blockquote><p>This paragraph will result in an indented "
               "block of text, typically used for quoting other text."
               "</p></blockquote><p>This is another one.</p>"
}


image = {
        'rst': '''.. image:: images/biohazard.png
   :width: 200
   :height: 100
   :scale: 50
   :alt: alternate text''',
        'out': '<img src="images/biohazard.png" alt="alternate text" '
               'scale="50" width="200" height="100" />'
}


figure = {
    'rst': '''.. figure:: picture.png
   :scale: 50%
   :alt: map to buried treasure

   This is the caption of the figure (a simple paragraph).''',
    'out': '''
    <figure>
        <img src="picture.png" alt="map to buried treasure" scale="50" />
        <figcaption>This is the caption of the figure (a simple paragraph).</figcaption>
    </figure>
''',
    'indent_output': True
}


inline_markup_1 = {
        'rst': '''*emphasis*
**strong emphasis**
`interpreted text`
`superscript`:sup:
`interpreted text with role`:emphasis:
`subscript`:sub:
``inline   literal   text``
''',
        'out': '''<commit_msg>tests: little adjustment in image test case<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# This file contains test data to rst2html5 in the form:
# case = {'rst': rst_text, 'out': expected_output, ...}

from __future__ import unicode_literals

indentation = {
    'rst': 'Paragraph',
    'out': '\n    <p>Paragraph</p>\n',
    'indent_output': True
}

title = {
    'rst': 'Title\n=====',
    'out': '<h1>Title</h1>'
}


title_accented_chars = {
    'rst': 'Título com Acentuação\n'
           '=====================',
    'out': '<h1>Título com Acentuação</h1>'
}

title_2 = {
        'rst': '''
Level 1
=======

some text

Level 1 Again
=============''',
    'out': '<a id="level-1"></a><section><h1>Level 1</h1><p>some text</p></section>'
           '<a id="level-1-again"></a><section><h1>Level 1 Again</h1></section>',

}


title_3 = {
    'rst': '''
=======
Level 1
=======

some text. Link to `Level 3`_

.. _section 2:

Level 2
=======

more text

Level 3
--------

link to `section 2`_''',
    'out': '''
    <h1>Level 1</h1>
    <p>some text. Link to <a href="#level-3">Level 3</a></p>
    <a id="level-2"></a>
    <a id="section-2"></a>
    <section>
        <h2>Level 2</h2>
        <p>more text</p>
        <a id="level-3"></a>
        <section>
            <h3>Level 3</h3>
            <p>link to <a href="#section-2">section 2</a></p>
        </section>
    </section>
''',
    'indent_output': True,
}


subtitle = {
    'rst': '''
================
 Document Title
================
----------
 Subtitle
----------

Section Title
=============

...''',
    'out': '<hgroup><h1>Document Title</h1><h2>Subtitle</h2></hgroup>'
           '<a id="section-title"></a><section><h1>Section Title</h1><p>...</p></section>',
}


'''
The subtitle processing should deal with indentation
'''
subtitle_2 = {
        'rst': '''
================
 Document Title
================
----------
 Subtitle
----------

Section Title
=============

...''',
        'out': '''
    <hgroup>
        <h1>Document Title</h1>
        <h2>Subtitle</h2>
    </hgroup>
    <a id="section-title"></a>
    <section>
        <h1>Section Title</h1>
        <p>...</p>
    </section>
''',
        'indent_output': True,
}


paragraph = {
        'rst': 'Lorem    ipsum dolor sit amet,        consectetur '
               'adipiscing          elit.\n'
                'Vestibulum    dignissim lacinia blandit. Suspendisse potenti.',
        'out': '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. '
               'Vestibulum dignissim lacinia blandit. Suspendisse potenti.</p>'
}


accented_paragraph = {
        'rst': 'Não há ninguém que ame a dor por si só, que a busque e '
              'queira tê-la, simplesmente por ser dor...',
        'out': '<p>Não há ninguém que ame a dor por si só, que a busque e '
               'queira tê-la, simplesmente por ser dor...</p>'
}


quoted_paragraph = {
        'rst': '''This is a paragraph.  It's   quite
short.

   This paragraph will result in an indented block of
   text, typically used for quoting other text.

This is another one.''',
        'out': "<p>This is a paragraph. It's quite short.</p>"
               "<blockquote><p>This paragraph will result in an indented "
               "block of text, typically used for quoting other text."
               "</p></blockquote><p>This is another one.</p>"
}


image = {
    'rst': '''.. _target:

target paragraph

.. image:: images/biohazard.png
   :width: 50px
   :height: 100px
   :alt: alternate text
   :target: target_
   :class: top

''',
    'out': '<a id="target"></a><p>target paragraph</p><a href="#target">'
           '<img src="images/biohazard.png" alt="alternate text" width="50px" '
           'class="top" height="100px" /></a>',
}


figure = {
    'rst': '''.. figure:: picture.png
   :scale: 50%
   :alt: map to buried treasure

   This is the caption of the figure (a simple paragraph).''',
    'out': '''
    <figure>
        <img src="picture.png" alt="map to buried treasure" scale="50" />
        <figcaption>This is the caption of the figure (a simple paragraph).</figcaption>
    </figure>
''',
    'indent_output': True
}


inline_markup_1 = {
        'rst': '''*emphasis*
**strong emphasis**
`interpreted text`
`superscript`:sup:
`interpreted text with role`:emphasis:
`subscript`:sub:
``inline   literal   text``
''',
        'out': '''
{'fraction_non_alphanumeric': 0.2185391951616655, 'fraction_numerical': 0.01674808094905792, 'mean_word_length': 2.4204455051710423, 'pattern_counts': {'":': 0, '<': 193, '<?xml version=': 0, '>': 193, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5751510', 'n_tokens_mistral': 3074, 'n_tokens_neox': 2932, 'n_words': 760}