<commit_before><?php
    $formatDifferences = [
        __('No html support, typographer & autolinker'),
        __('An additional syntax to reference MISP Elements'),
    ];
    $allowedScopes = ['attribute', 'object', 'galaxymatrix'];
    $allowedScopesHtml = '<code>' . implode('</code> <code>', $allowedScopes) . '</code>';
?>

<h2><?= __('Markdown format') ?></h2>
<p><?= __('The suported markdown format is similar to %s with some differences:', sprintf('<a href="%s" target="_blank">GFM</a>', 'https://github.github.com/gfm/')) ?></p>
<ul>
    <?php foreach($formatDifferences as $formatDifference): ?>
        <li><?= $formatDifference ?></li>
    <?php endforeach; ?>
</ul>

<h2><?= __('Markdown extended format') ?></h2>
<p><?= __('In order to have a visually pleasant report but more importantly, avoid hardcoding elements value or IDs, MISP elements such as attributes and objects can be referenced with the following special syntax') ?></p>
<h4 style="text-align: center;">
    <code style="font-size: 14px;">@[scope](UUID)</code>
</h4>
<span><?= __('Where:') ?></span>
<ul>
    <li><b>scope</b>: <?= __('Is the scope to which the UUID is related.') ?></li>
    <ul>
        <li><?= __('Can be one of the following: %s', $allowedScopesHtml) ?></li>
    </ul>
    <li><b>id</b>: <?= __('Is the UUID of the MISP element.') ?></li>
</ul>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@[attribute](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
    <li><code>@[object](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
    <li><code>@[galaxymatrix](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul>

<h4><?= __('Picture from attachment attribute') ?></h4>
<p><?= __('Syntax for pictures is like the syntax for referencing MISP elements but with two differences:') ?></p>
<ul>
    <li><?= __('The addition of the %s character to indicate that the picture should be displayed and not the atttribute', '<code>!</code>') ?></li>
    <li><?= __('The scope is fixed to %s', '<code>attribute</code>') ?></li>
</ul>

<h4 style="text-align: center;">
    <code style="font-size: 14px;">@![attribute](UUID)</code>
</h4>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@![attribute](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul>

<h4><?= __('Event\'s Galaxy matrixes') ?></h4>
<p><?=  __('Syntax for embedding the ATT&CK matrix or any other Galaxy matrixes is similar the syntax for referencing MISP elements:') ?></p>
<ul>
    <li><?= __('The scope is fixed to %s', '<code>galaxymatrix</code>') ?></li>
    <li><?= __('The ID of the galaxy matrix. The matrix will be generated for the whole event for which the report is linked to') ?></li>
</ul>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@[galaxymatrix](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul><commit_msg>chg: [eventReport] Added entry for referencing tags in markdownEditor's help modal<commit_after><?php
    $formatDifferences = [
        __('No html support, typographer & autolinker'),
        __('An additional syntax to reference MISP Elements'),
    ];
    $allowedScopes = ['attribute', 'object', 'galaxymatrix' ,'tag'];
    $allowedScopesHtml = '<code>' . implode('</code> <code>', $allowedScopes) . '</code>';
?>

<h2><?= __('Markdown format') ?></h2>
<p><?= __('The suported markdown format is similar to %s with some differences:', sprintf('<a href="%s" target="_blank">GFM</a>', 'https://github.github.com/gfm/')) ?></p>
<ul>
    <?php foreach($formatDifferences as $formatDifference): ?>
        <li><?= $formatDifference ?></li>
    <?php endforeach; ?>
</ul>

<h2><?= __('Markdown extended format') ?></h2>
<p><?= __('In order to have a visually pleasant report but more importantly, avoid hardcoding elements value or IDs, MISP elements such as attributes and objects can be referenced with the following special syntax') ?></p>
<h4 style="text-align: center;">
    <code style="font-size: 14px;">@[scope](UUID)</code>
</h4>
<span><?= __('Where:') ?></span>
<ul>
    <li><b>scope</b>: <?= __('Is the scope to which the UUID is related.') ?></li>
    <ul>
        <li><?= __('Can be one of the following: %s', $allowedScopesHtml) ?></li>
    </ul>
    <li><b>UUID</b>: <?= __('Is the UUID of the MISP element with only one excpetion for the tag') ?></li>
</ul>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@[attribute](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
    <li><code>@[object](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
    <li><code>@[galaxymatrix](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul>

<h4><?= __('Picture from attachment attribute') ?></h4>
<p><?= __('Syntax for pictures is like the syntax for referencing MISP elements but with two differences:') ?></p>
<ul>
    <li><?= __('The addition of the %s character to indicate that the picture should be displayed and not the atttribute', '<code>!</code>') ?></li>
    <li><?= __('The scope is fixed to %s', '<code>attribute</code>') ?></li>
</ul>

<h4 style="text-align: center;">
    <code style="font-size: 14px;">@![attribute](UUID)</code>
</h4>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@![attribute](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul>

<h4><?= __('Tags') ?></h4>
<p><?=  __('Syntax for representing tags is similar the syntax for referencing MISP elements:') ?></p>
<ul>
    <li><?= __('The scope is fixed to %s', '<code>tag</code>') ?></li>
    <li><?= __('The UUID is replaced by the tag name') ?></li>
</ul>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@[tag](tlp:green)</code></li>
    <li><code>@[tag](misp-galaxy:threat-actor="APT 29")</code></li>
</ul>

<h4><?= __('Event\'s Galaxy matrixes') ?></h4>
<p><?=  __('Syntax for embedding the ATT&CK matrix or any other Galaxy matrixes is similar the syntax for referencing MISP elements:') ?></p>
<ul>
    <li><?= __('The scope is fixed to %s', '<code>galaxymatrix</code>') ?></li>
    <li><?= __('The UUID of the galaxy matrix. The matrix will be generated for the whole event for which the report is linked to') ?></li>
</ul>
<span><?= __('Examples:') ?></span>
<ul>
    <li><code>@[galaxymatrix](5f1accda-cde4-47fc-baf1-6ab8f331dc3b)</code></li>
</ul>
{'fraction_non_alphanumeric': 0.22559793148028442, 'fraction_numerical': 0.025210084033613446, 'mean_word_length': 4.626363636363636, 'pattern_counts': {'":': 0, '<': 278, '<?xml version=': 0, '>': 278, 'https://': 2, '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': '3101459', 'n_tokens_mistral': 2293, 'n_tokens_neox': 2299, 'n_words': 627}