<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-03-23T22:21:45+09:00</updated><id>/feed.xml</id><title type="html">Andre Attamimi</title><subtitle>I strongly believe in the importance of learning, practicing, sharing, and growing. I am also committed to doing this in my life, so that it benefits both myself and others.</subtitle><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><entry><title type="html">Complete Guide to Markdown Test Rendering</title><link href="/blog/markdown-rendering/" rel="alternate" type="text/html" title="Complete Guide to Markdown Test Rendering" /><published>2024-04-24T00:00:00+09:00</published><updated>2024-04-24T00:00:00+09:00</updated><id>/blog/markdown-rendering</id><content type="html" xml:base="/blog/markdown-rendering/"><![CDATA[<p>This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for <a href="https://www.markdownguide.org/basic-syntax/">basic syntax</a> and <a href="https://www.markdownguide.org/extended-syntax/">extended syntax</a>.</p>

<blockquote class="alert alert-note no-title">
  <ol>
    <li>
      <p>For generated <code class="language-plaintext highlighter-rouge">page.excerpt</code>, include the first paragraphs and/or avoid using comments after the front matter.</p>
    </li>
    <li>
      <p>If using the inline attribute list <code class="language-plaintext highlighter-rouge">{: ... }</code> and it doesn’t work as expected, see further <a href="https://kramdown.gettalong.org/syntax.html#attribute-list-definitions">Attribute List Definitions</a>.</p>
    </li>
  </ol>
</blockquote>

<!-- markdownlint-disable MD022 MD025 MD033 MD036 -->

<details class="markdown-toc">
<summary class="toc-title">Table of Contents</summary>
<nav class="toc-content" role="doc-toc" aria-label="Table of Content">
<ul class="toc__list" id="markdown-toc">
  <li><a href="#basic-features" id="markdown-toc-basic-features">Basic Features</a>    <ul>
      <li><a href="#headings" id="markdown-toc-headings">Headings</a></li>
      <li><a href="#paragraphs" id="markdown-toc-paragraphs">Paragraphs</a></li>
      <li><a href="#emphasis" id="markdown-toc-emphasis">Emphasis</a></li>
      <li><a href="#lists" id="markdown-toc-lists">Lists</a></li>
      <li><a href="#links" id="markdown-toc-links">Links</a></li>
      <li><a href="#blockquotes" id="markdown-toc-blockquotes">Blockquotes</a></li>
      <li><a href="#codes" id="markdown-toc-codes">Codes</a></li>
      <li><a href="#footnotes" id="markdown-toc-footnotes">Footnotes</a></li>
      <li><a href="#tables" id="markdown-toc-tables">Tables</a></li>
      <li><a href="#horizontal-rule" id="markdown-toc-horizontal-rule">Horizontal Rule</a></li>
      <li><a href="#images" id="markdown-toc-images">Images</a></li>
    </ul>
  </li>
  <li><a href="#extended-features" id="markdown-toc-extended-features">Extended Features</a>    <ul>
      <li><a href="#code-blocks" id="markdown-toc-code-blocks">Code Blocks</a></li>
      <li><a href="#admonitions" id="markdown-toc-admonitions">Admonitions</a></li>
      <li><a href="#diagramming" id="markdown-toc-diagramming">Diagramming</a></li>
      <li><a href="#mathematics" id="markdown-toc-mathematics">Mathematics</a></li>
      <li><a href="#other-elements" id="markdown-toc-other-elements">Other elements</a></li>
      <li><a href="#emoji-shortcodes" id="markdown-toc-emoji-shortcodes">Emoji Shortcodes</a></li>
    </ul>
  </li>
</ul>

  </nav>
</details>

<h2 id="basic-features">Basic Features</h2>

<h3 id="headings">Headings</h3>

<h1 class="no_toc no_anchor" id="heading-1">Heading 1</h1>

<h2 class="no_toc no_anchor" id="heading-2">Heading 2</h2>

<h3 class="no_toc no_anchor" id="heading-3">Heading 3</h3>

<h4 class="no_toc no_anchor" id="heading-4">Heading 4</h4>

<h5 class="no_toc no_anchor" id="heading-5">Heading 5</h5>

<h6 class="no_toc no_anchor" id="heading-6">Heading 6</h6>

<h3 id="paragraphs">Paragraphs</h3>

<p>Elit ex ex eiusmod duis cupidatat duis esse laboris et sit reprehenderit eu. Elit sint nostrud ex reprehenderit fugiat do elit anim veniam nulla veniam amet. Nisi velit deserunt sunt excepteur irure ut ipsum excepteur minim.</p>

<p>Et laborum minim elit laboris dolor in. Nisi sunt labore pariatur magna fugiat cupidatat qui quis consequat aliqua commodo. Dolor nisi veniam elit proident. Irure laboris tempor consectetur ad enim ea officia ullamco.</p>

<h3 id="emphasis">Emphasis</h3>

<p><strong>Bold text</strong></p>

<p><em>Italicized text</em></p>

<p><del>Strikethrough</del></p>

<h3 id="lists">Lists</h3>

<h4 id="ordered-list">Ordered List</h4>

<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item
    <ol>
      <li>Indented item</li>
      <li>Indented item</li>
    </ol>
  </li>
  <li>Fourth item</li>
</ol>

<h4 id="unordered-list">Unordered List</h4>

<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item
    <ul>
      <li>Indented item
        <ul>
          <li>Indented item</li>
        </ul>
      </li>
    </ul>
  </li>
  <li>Fourth item</li>
</ul>

<h4 id="definition-list">Definition List</h4>

<dl>
  <dt>First Term</dt>
  <dd>This is the definition of the first term.</dd>
  <dt>Second Term</dt>
  <dd>This is one definition of the second term.</dd>
  <dd>This is another definition of the second term.</dd>
</dl>

<h4 id="tasktodo-list">Task/Todo List</h4>

<ul class="task-list">
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />Write the press release</li>
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" checked="checked" />Update the website</li>
  <li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled="disabled" />Contact the media</li>
</ul>

<h3 id="links">Links</h3>

<p><a href="https://jekyllrb.com">https://jekyllrb.com</a></p>

<p>Free <strong><a href="https://www.google.com/search?q=free+palestine">Palestine</a></strong>.</p>

<h3 id="blockquotes">Blockquotes</h3>

<blockquote cite="&lt;https://www.huxley.net/bnw/four.html&gt;">
  <p>Words can be like X-rays, if you use them properly—they’ll go through anything. You read and you’re pierced.</p>

  <p>—Aldous Huxley, <cite>Brave New World</cite></p>
</blockquote>

<h3 id="codes">Codes</h3>

<p><strong>Sample output</strong>: <samp>This is sample output from a computer program.</samp></p>

<p><strong>Keyboard input</strong>: <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Esc</kbd></p>

<p><strong>Inline code</strong>: <code class="language-plaintext highlighter-rouge">{"firstName": "John","lastName": "Smith","age": 25}</code></p>

<p><strong>Block code</strong>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
</pre></td><td class="rouge-code"><pre>{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="footnotes">Footnotes</h3>

<p>Here’s a simple footnote,<sup id="fnref:1"><a href="#fn:1" class="footnote" rel="footnote" role="doc-noteref">1</a></sup> and here’s a longer one.<sup id="fnref:bignote"><a href="#fn:bignote" class="footnote" rel="footnote" role="doc-noteref">2</a></sup></p>

<h3 id="tables">Tables</h3>

<p>Table with <a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github">Github Flavored Markdown</a>:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Column 1</th>
      <th style="text-align: center">Column 2</th>
      <th style="text-align: right">Column 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Cell 1</td>
      <td style="text-align: center">Cell 1</td>
      <td style="text-align: right">Cell 1</td>
    </tr>
    <tr>
      <td style="text-align: left">Cell 2</td>
      <td style="text-align: center">Cell 2</td>
      <td style="text-align: right">Cell 2</td>
    </tr>
    <tr>
      <td style="text-align: left">Cell 3</td>
      <td style="text-align: center">Cell 3</td>
      <td style="text-align: right">Cell 3</td>
    </tr>
    <tr>
      <td style="text-align: left">Cell 4</td>
      <td style="text-align: center">Cell 4</td>
      <td style="text-align: right">Cell 4</td>
    </tr>
  </tbody>
</table>

<p>Table with HTML elements:</p>

<table>
  <caption>Front-end web developer course 2021</caption>
  <thead>
    <tr>
      <th scope="col">Person</th>
      <th scope="col">Most interest in</th>
      <th scope="col">Age</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">Chris</th>
      <td>HTML tables</td>
      <td>22</td>
    </tr>
    <tr>
      <th scope="row">Dennis</th>
      <td>Web accessibility</td>
      <td>45</td>
    </tr>
    <tr>
      <th scope="row">Sarah</th>
      <td>JavaScript frameworks</td>
      <td>29</td>
    </tr>
    <tr>
      <th scope="row">Karen</th>
      <td>Web performance</td>
      <td>36</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row" colspan="2">Average age</th>
      <td>33</td>
    </tr>
  </tfoot>
</table>

<h3 id="horizontal-rule">Horizontal Rule</h3>

<hr />

<h3 id="images">Images</h3>

<h4 id="float-to-left">Float to left</h4>

<p><img src="/assets/img/placeholder/512x512.svg" alt="Image float to left" class="image pull-left" width="256" /> Labore do pariatur labore labore Lorem occaecat nulla. Non do adipisicing est officia et. Dolore ullamco laboris est commodo laborum magna ut amet ad dolor ipsum anim aliquip consectetur. Cupidatat culpa in quis ea quis dolor amet velit minim.</p>

<h4 id="float-to-right">Float to right</h4>

<p><img src="/assets/img/placeholder/512x512.svg" alt="Image float to right" class="image pull-right" width="256" /> Enim voluptate ullamco amet ipsum qui incididunt aliqua culpa cillum commodo aliqua. Incididunt Lorem consequat elit tempor officia sunt incididunt Lorem nulla minim excepteur duis consequat. Ullamco eiusmod ex consectetur fugiat dolore laboris nulla dolor. Consequat esse cupidatat sunt sit proident consequat officia sit. In enim ea tempor laborum. Dolor laboris esse ad consectetur minim ut velit non ipsum minim labore.</p>

<h2 id="extended-features">Extended Features</h2>

<h3 id="code-blocks">Code Blocks</h3>

<p>This is a code block with syntax highlighting:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre><span class="p">{</span><span class="w">
  </span><span class="nl">"thisSyntax"</span><span class="p">:</span><span class="w"> </span><span class="err">error</span><span class="p">,</span><span class="w">
  </span><span class="nl">"firstName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"lastName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Smith"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"age"</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></pre></td></tr></tbody></table></code></pre></div></div>

<p class="alert alert-note">For more syntax highlighting see: <a href="/blog/rouge-highlighting/">Rouge Highlighting</a></p>

<h3 id="admonitions">Admonitions</h3>

<p>Alerts or admonitions are frequently used in documentation to draw attention to warnings, notes, and other important information. The example below is adapted from <a href="https://github.com/orgs/community/discussions/16925" target="\_blank">GitHub Flavored Markdown</a>.</p>

<p>Default:</p>

<blockquote class="alert">
  <p>General information or also for Blockquote alternatives.</p>
</blockquote>

<p>Note:</p>

<blockquote class="alert alert-note">
  <p>Highlights information that users should consider, even when skimming.</p>
</blockquote>

<p>Tip:</p>

<blockquote class="alert alert-tip">
  <p>Optional information to help a user be more successful.</p>
</blockquote>

<p>Important:</p>

<blockquote class="alert alert-important">
  <p>Crucial information necessary for users to succeed.</p>
</blockquote>

<p>Warning:</p>

<blockquote class="alert alert-warning">
  <p>Critical content requiring immediate user attention due to potential risks.</p>
</blockquote>

<p>Caution:</p>

<blockquote class="alert alert-caution">
  <p>Potential negative consequences of an action.</p>
</blockquote>

<h3 id="diagramming">Diagramming</h3>

<p>Diagramming and charting powered by <a href="https://mermaid.js.org/">Mermaid</a>:</p>

<pre><code class="language-mermaid">gitGraph
    commit
    commit
    branch develop
    checkout develop
    commit
    commit
    checkout main
    merge develop
    commit
    commit
</code></pre>

<p class="alert alert-note">For more Mermaid syntax see: <a href="/blog/mermaid-diagram/">Mermaid Diagram</a></p>

<h3 id="mathematics">Mathematics</h3>

<p>inline: \(f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi\)</p>

<p>display mode (centered):</p>

\[f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} \,d\xi\]

<h3 id="other-elements">Other elements</h3>

<p><strong>Abbreviation</strong>: *[HTML]: Hyper Text Markup Language The HTML specification is maintained by the W3C.</p>

<p><strong>Marked</strong>: <mark>very important words</mark>.</p>

<p><strong>Subscript</strong>: C<sub>8</sub>H<sub>10</sub>N<sub>4</sub>O<sub>2</sub></p>

<p><strong>Superscript</strong>: <var>E</var>=<var>m</var><var>c</var><sup>2</sup>.</p>

<h3 id="emoji-shortcodes">Emoji Shortcodes</h3>

<p>If you see <strong>:raised_hand:</strong> as an emoji like this ✋ it means Emoji Shortcode is enable by plugin, otherwise open terminal and run the command below:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
</pre></td><td class="rouge-code"><pre><span class="c"># Add plugin to Gemfile</span>
<span class="nb">echo</span> <span class="s1">'gem "jemoji", group:jekyll_plugins'</span> <span class="o">&gt;&gt;</span> Gemfile

<span class="c"># Install plugin</span>
bundle <span class="nb">install</span>

<span class="c"># Test on local</span>
bundle <span class="nb">exec </span>jekyll serve <span class="nt">--watch</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<p class="alert alert-tip">In most cases, you can simply copy an emoji from a source like <a href="https://emojipedia.org/">Emojipedia</a> or <a href="https://emojicopy.com/">EmojiCopy</a> then paste it into your document.</p>

<!-- *This is the result of footnotes* -->

<!-- A footnote will be displayed automatically after this line. -->
<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:1">
      <p>This is the first footnote. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:bignote">
      <p>Here’s one with multiple paragraphs and code.</p>

      <p>Indent paragraphs to include them in the footnote.</p>

      <p><code class="language-plaintext highlighter-rouge">{ my code }</code></p>

      <p>Add as many paragraphs as you like. <a href="#fnref:bignote" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><category term="test" /><category term="jekyll" /><category term="markdown" /><category term="cheatsheet" /><summary type="html"><![CDATA[A quick overview of all the Markdown syntax elements]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/assets/img/posts/thumb-markdown.jpg" /><media:content medium="image" url="/assets/img/posts/thumb-markdown.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Mermaid.js: Build Complex Diagrams with Simple Text Descriptions</title><link href="/blog/mermaid-diagram/" rel="alternate" type="text/html" title="Mermaid.js: Build Complex Diagrams with Simple Text Descriptions" /><published>2023-03-23T00:00:00+09:00</published><updated>2023-03-23T00:00:00+09:00</updated><id>/blog/mermaid-diagram</id><content type="html" xml:base="/blog/mermaid-diagram/"><![CDATA[<p>Mermaid.js is a powerful JavaScript-based tool for creating diagrams and visualizations using simple text descriptions. It allows you to dynamically render various types of diagrams directly from Markdown-inspired text definitions. Below, you’ll find descriptions and examples for different types of diagrams supported by Mermaid.js.</p>

<h2 id="introduction">Introduction</h2>

<p>Here’s a refined and detailed explanation of the different types of diagrams you can create with Mermaid.js, including the syntax used for each Each type of Mermaid diagram is designed to fulfill specific needs in documentation and programming, providing an intuitive way to visualize complex information through simple text descriptions:</p>

<h2 id="flowchart">Flowchart</h2>

<p>Flowcharts are used to represent process flows or workflows. They show the sequence of steps in a process, helping to visualize the order and connections between tasks.</p>

<pre><code class="language-mermaid">flowchart TD
    A[Christmas] --&gt;|Get money| B(Go shopping)
    B --&gt; C{Let me think}
    C --&gt;|One| D[Laptop]
    C --&gt;|Two| E[iPhone]
    C --&gt;|Three| F[fa:fa-car Car]
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">flowchart TD</code> specifies a top-down layout.</li>
  <li>Arrows (<code class="language-plaintext highlighter-rouge">--&gt;</code>) indicate the direction of flow.</li>
  <li><code class="language-plaintext highlighter-rouge">|Get money|</code> represents the label on the arrow.</li>
</ul>

<h2 id="gantt-chart">Gantt Chart</h2>

<p>Gantt charts are used for project planning, displaying timelines and the progress of various tasks over time.</p>

<pre><code class="language-mermaid">gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">gantt</code> denotes the chart type.</li>
  <li><code class="language-plaintext highlighter-rouge">dateFormat</code> sets the date format.</li>
  <li><code class="language-plaintext highlighter-rouge">section</code> groups tasks into sections.</li>
  <li>Tasks are defined with a start date and duration.</li>
</ul>

<h2 id="class-diagram">Class Diagram</h2>

<p>Class diagrams represent the structure of classes in object-oriented programming, showing their attributes and methods.</p>

<pre><code class="language-mermaid">classDiagram
    Animal &lt;|-- Duck
    Animal &lt;|-- Fish
    Animal &lt;|-- Zebra
    Animal : +int age
    Animal : +String gender
    Animal: +isMammal()
    Animal: +mate()
    class Duck{
      +String beakColor
      +swim()
      +quack()
    }
    class Fish{
      -int sizeInFeet
      -canEat()
    }
    class Zebra{
      +bool is_wild
      +run()
    }
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">classDiagram</code> specifies the diagram type.</li>
  <li><code class="language-plaintext highlighter-rouge">Animal &lt;|-- Duck</code> shows inheritance.</li>
  <li>Classes and their attributes/methods are defined within <code class="language-plaintext highlighter-rouge">class</code> blocks.</li>
</ul>

<h2 id="state-diagram">State Diagram</h2>

<p>State diagrams represent states and transitions of an entity, useful for modeling state changes in a system.</p>

<pre><code class="language-mermaid">stateDiagram-v2
    [*] --&gt; Still
    Still --&gt; [*]
    Still --&gt; Moving
    Moving --&gt; Still
    Moving --&gt; Crash
    Crash --&gt; [*]
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">stateDiagram-v2</code> indicates the version.</li>
  <li><code class="language-plaintext highlighter-rouge">[*]</code> represents the initial and final states.</li>
  <li>Transitions are shown with arrows.</li>
</ul>

<h2 id="entity-relationship-diagram-erd">Entity Relationship Diagram (ERD)</h2>

<p>ERDs show the relationships between entities in a database, useful for designing and understanding data structures.</p>

<pre><code class="language-mermaid">erDiagram
    CUSTOMER }|..|{ DELIVERY-ADDRESS : has
    CUSTOMER ||--o{ ORDER : places
    CUSTOMER ||--o{ INVOICE : "liable for"
    DELIVERY-ADDRESS ||--o{ ORDER : receives
    INVOICE ||--|{ ORDER : covers
    ORDER ||--|{ ORDER-ITEM : includes
    PRODUCT-CATEGORY ||--|{ PRODUCT : contains
    PRODUCT ||--o{ ORDER-ITEM : "ordered in"
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">erDiagram</code> specifies the diagram type.</li>
  <li>Relationships are denoted with different symbols (<code class="language-plaintext highlighter-rouge">}|..|{</code>, <code class="language-plaintext highlighter-rouge">||--o{</code>, etc.).</li>
</ul>

<h2 id="pie-chart">Pie Chart</h2>

<p>Pie charts represent data distribution in a circular format, showing the proportion of each category.</p>

<pre><code class="language-mermaid">pie title Pets adopted by volunteers
    "Dogs" : 386
    "Cats" : 85
    "Rats" : 15
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">pie</code> specifies the diagram type.</li>
  <li><code class="language-plaintext highlighter-rouge">title</code> sets the chart’s title.</li>
  <li>Categories and values are listed with their proportions.</li>
</ul>

<h2 id="journey">Journey</h2>

<p>Journey diagrams represent the steps involved in a process or scenario, showing different stages and actions.</p>

<pre><code class="language-mermaid">journey
    title My working day
    section Go to work
      Make tea: 5: Me
      Go upstairs: 3: Me
      Do work: 1: Me, Cat
    section Go home
      Go downstairs: 5: Me
      Sit down: 3: Me
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">journey</code> specifies the diagram type.</li>
  <li><code class="language-plaintext highlighter-rouge">section</code> groups stages of the journey.</li>
  <li>Actions are listed with their durations and participants.</li>
</ul>

<h2 id="requirement-diagram">Requirement Diagram</h2>

<p>Requirement diagrams represent system requirements and their relationships, useful for capturing and validating system needs.</p>

<pre><code class="language-mermaid">requirementDiagram

requirement test_req {
    id: 1
    text: the test text.
    risk: high
    verifymethod: test
}

element test_entity {
    type: simulation
}

test_entity - satisfies -&gt; test_req
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">requirementDiagram</code> indicates the diagram type.</li>
  <li><code class="language-plaintext highlighter-rouge">requirement</code> and <code class="language-plaintext highlighter-rouge">element</code> define requirements and their properties.</li>
  <li>Relationships are shown with arrows.</li>
</ul>

<h2 id="gitgraph">GitGraph</h2>

<p>GitGraph diagrams visualize Git repositories and branches, helping to understand the branching and merging history.</p>

<pre><code class="language-mermaid">gitGraph
    commit
    commit
    branch develop
    checkout develop
    commit
    commit
    checkout main
    merge develop
    commit
    commit
</code></pre>

<ul>
  <li><code class="language-plaintext highlighter-rouge">gitGraph</code> specifies the diagram type.</li>
  <li><code class="language-plaintext highlighter-rouge">commit</code> represents a commit in the graph.</li>
  <li><code class="language-plaintext highlighter-rouge">branch</code>, <code class="language-plaintext highlighter-rouge">checkout</code>, and <code class="language-plaintext highlighter-rouge">merge</code> commands show branch operations.</li>
</ul>]]></content><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><category term="test" /><category term="jekyll" /><category term="mermaid" /><summary type="html"><![CDATA[Generate diagrams from markdown-like text.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/assets/img/posts/thumb-mermaid-js.jpg" /><media:content medium="image" url="/assets/img/posts/thumb-mermaid-js.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Code Highlighting with Rouge</title><link href="/blog/rouge-highlighting/" rel="alternate" type="text/html" title="Code Highlighting with Rouge" /><published>2023-03-23T00:00:00+09:00</published><updated>2023-03-23T00:00:00+09:00</updated><id>/blog/rouge-highlighting</id><content type="html" xml:base="/blog/rouge-highlighting/"><![CDATA[<p>Rouge is a syntax highlighter written in Ruby that supports over 200 programming languages. It can generate both HTML and ANSI 256-color text output. The HTML output produced by Rouge is compatible with stylesheets designed for <a href="http://pygments.org">Pygments</a>, another popular syntax highlighter.</p>

<!-- markdownlint-disable MD018 MD031 -->

<h2 id="introduction">Introduction</h2>

<p>This guide provides a comprehensive overview of how Rouge handles syntax highlighting for various programming languages and configurations, including code blocks, line numbering, and using Liquid tags for highlighting within Jekyll.</p>

<h2 id="codes">Codes</h2>

<p><strong>Sample output</strong>: <samp>This is sample output from a computer program.</samp></p>

<p><strong>Keyboard input</strong>: <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Esc</kbd></p>

<p><strong>Inline code</strong>: <code class="language-plaintext highlighter-rouge">{"firstName": "John","lastName": "Smith","age": 25}</code></p>

<h2 id="code-blocks">Code Blocks</h2>

<h3 id="unknown">Unknown</h3>

<pre><code class="language-unknown">{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
</code></pre>

<h3 id="plaintext">Plaintext</h3>

<p>A code block without syntax highlighting or using <code class="language-plaintext highlighter-rouge">plaintext</code> (the default) will look like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre>{
  "thisSyntax": error
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
</pre></td></tr></tbody></table></code></pre></div></div>

<p>This block is displayed without any syntax-specific colors or formatting.</p>

<h3 id="line-numbers">Line Numbers</h3>

<p>By default, line numbers are not shown. To include line numbers, add the attribute class <code class="language-plaintext highlighter-rouge">{: .d-lineno }</code> before or after the code block:</p>

<p><strong>Sample:</strong></p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
</pre></td><td class="rouge-code"><pre><span class="p">```</span><span class="nl">json
</span><span class="p">{</span><span class="w">
  </span><span class="nl">"thisSyntax"</span><span class="p">:</span><span class="w"> </span><span class="err">error</span><span class="w">
  </span><span class="nl">"firstName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"lastName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Smith"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"age"</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="w">
</span><span class="p">}</span>
<span class="p">```</span>
{:.d-lineno} <span class="c">&lt;!-- like this --&gt;</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<p><strong>Output:</strong></p>

<div class="language-json d-lineno highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre><span class="p">{</span><span class="w">
  </span><span class="nl">"thisSyntax"</span><span class="p">:</span><span class="w"> </span><span class="err">error</span><span class="w">
  </span><span class="nl">"firstName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"lastName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Smith"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"age"</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></pre></td></tr></tbody></table></code></pre></div></div>

<p>This will enable line numbering in the highlighted code block.</p>

<h3 id="mark-lines">Mark Lines</h3>

<p>By default mark lines the class <code class="language-plaintext highlighter-rouge">.hll</code></p>

<p><strong>Sample:</strong></p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
</pre></td><td class="rouge-code"><pre><span class="p">```</span><span class="nl">json
</span><span class="p">{</span><span class="w">
  </span><span class="nl">"thisSyntax"</span><span class="p">:</span><span class="w"> </span><span class="err">error</span><span class="w">
  </span><span class="nl">"firstName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"lastName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Smith"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"age"</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="w">
</span><span class="p">}</span>
<span class="p">```</span>
{:data-mark-lines='2 4'} <span class="c">&lt;!-- like this --&gt;</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<p><strong>Output:</strong></p>

<div data-mark-lines="2 4" class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
</pre></td><td class="rouge-code"><pre><span class="p">{</span><span class="w">
  </span><span class="nl">"thisSyntax"</span><span class="p">:</span><span class="w"> </span><span class="err">error</span><span class="w">
  </span><span class="nl">"firstName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"lastName"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Smith"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"age"</span><span class="p">:</span><span class="w"> </span><span class="mi">25</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="liquid-tags">Liquid Tags</h3>

<p>In addition to using markdown for code blocks, you can use Liquid’s <code class="language-plaintext highlighter-rouge">{% highlight %}</code> tag for syntax highlighting within Jekyll. This is how you use it:</p>

<p>This is a code block with syntax highlighting using the Liquid <code class="language-plaintext highlighter-rouge">{% highlight %}</code> tag:</p>

<p><strong>Sample:</strong></p>

<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
</pre></td><td class="rouge-code"><pre><span class="cp">{%</span><span class="w"> </span><span class="nt">highlight</span><span class="w"> </span><span class="nv">ruby</span><span class="w"> </span><span class="nv">linenos</span><span class="w"> </span><span class="na">mark_lines</span><span class="o">=</span><span class="s2">"1 2"</span><span class="w"> </span><span class="cp">%}</span>
def print_hi(name)
  puts "Hi, #{name}"
end
print_hi('Tom')
#=&gt; prints 'Hi, Tom' to STDOUT.
<span class="cp">{%</span><span class="w"> </span><span class="nt">endhighlight</span><span class="w"> </span><span class="cp">%}</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<p><strong>Output:</strong></p>

<figure class="highlight highlight-tag"><pre><code class="language-ruby" data-lang="ruby"><table class="rouge-table"><tbody><tr><td class="gutter gl"><pre class="lineno">1
2
3
4
5
</pre></td><td class="code"><pre><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
  <span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>
<span class="c1">#=&gt; prints 'Hi, Tom' to STDOUT.</span>
</pre></td></tr></tbody></table></code></pre></figure>

<p>This example highlights Ruby code and marks specific lines (lines 1 and 2) to draw attention.</p>

<h3 id="advanced">Advanced</h3>

<p><strong>Sample:</strong></p>

<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
</pre></td><td class="rouge-code"><pre><span class="p">```</span><span class="nl">cpp
</span><span class="cp">#include</span> <span class="cpf">&lt;iostream&gt;</span><span class="cp">
</span><span class="k">using</span> <span class="k">namespace</span> <span class="n">std</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
  <span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"Hello World!"</span><span class="p">;</span>
  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">```</span>
{: data-code='name:"main.c";icon:"brand-cpp";href:"https://gist.github.com/sionta/a3e9dec5ae0453cf21543bf5332e7fe0";' }
</pre></td></tr></tbody></table></code></pre></div></div>

<p><strong>Output:</strong></p>

<div data-code="name:&quot;main.c&quot;;icon:&quot;brand-cpp&quot;;href:&quot;https://gist.github.com/sionta/a3e9dec5ae0453cf21543bf5332e7fe0&quot;;" class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
</pre></td><td class="rouge-code"><pre><span class="cp">#include</span> <span class="cpf">&lt;iostream&gt;</span><span class="cp">
</span><span class="k">using</span> <span class="k">namespace</span> <span class="n">std</span><span class="p">;</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
  <span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"Hello World!"</span><span class="p">;</span>
  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h2 id="language-examples">Language Examples</h2>

<p>Here are examples of how different languages are highlighted using Rouge:</p>

<h3 id="diff">Diff</h3>

<p>The <code class="language-plaintext highlighter-rouge">diff</code> language shows changes between versions, with additions and deletions marked.</p>

<div class="language-diff highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
</pre></td><td class="rouge-code"><pre><span class="p">function addTwoNumbers (num1, num2) {
</span><span class="gd">-  return 1 + 2
</span><span class="gi">+  return num1 + num2
</span>}
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="yaml">YAML</h3>

<p>YAML syntax is used for configuration files and data serialization.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
</pre></td><td class="rouge-code"><pre><span class="na">kramdown</span><span class="pi">:</span>
    <span class="na">input</span><span class="pi">:</span> <span class="s">GFM</span>

<span class="c1"># Generate social links.</span>
<span class="na">social_links</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="pi">{</span> <span class="nv">title</span><span class="pi">:</span> <span class="nv">GitHub</span><span class="pi">,</span> <span class="nv">url</span><span class="pi">:</span> <span class="s2">"</span><span class="s">https://github.com/sionta"</span> <span class="pi">}</span>
    <span class="pi">-</span> <span class="pi">{</span> <span class="nv">title</span><span class="pi">:</span> <span class="nv">Twitter</span><span class="pi">,</span> <span class="nv">url</span><span class="pi">:</span> <span class="s2">"</span><span class="s">https://twitter.com/r007mmxv"</span> <span class="pi">}</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="toml">TOML</h3>

<p>TOML is a configuration file format designed for simplicity.</p>

<div class="language-toml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
</pre></td><td class="rouge-code"><pre><span class="nn">[social_links]</span>
  <span class="py">name</span> <span class="p">=</span> <span class="s">"Andre Attamimi"</span>
  <span class="py">github</span> <span class="p">=</span> <span class="s">"https://github.com/sionta"</span>

<span class="nn">[menu]</span>
<span class="nn">[[menu.header]]</span>
<span class="py">identifier</span> <span class="p">=</span> <span class="s">"about"</span>
<span class="py">name</span> <span class="p">=</span> <span class="s">"About"</span>
<span class="py">url</span> <span class="p">=</span> <span class="s">"/about/"</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="html">HTML</h3>

<p>HTML syntax is used for structuring web pages.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="rouge-code"><pre><span class="cp">&lt;!DOCTYPE html&gt;</span>
<span class="nt">&lt;html</span> <span class="na">lang=</span><span class="s">"en"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;head&gt;</span>
        <span class="nt">&lt;meta</span> <span class="na">charset=</span><span class="s">"UTF-8"</span> <span class="nt">/&gt;</span>
        <span class="nt">&lt;meta</span> <span class="na">name=</span><span class="s">"viewport"</span> <span class="na">content=</span><span class="s">"width=device-width, initial-scale=1.0"</span> <span class="nt">/&gt;</span>
        <span class="nt">&lt;title&gt;</span>Document<span class="nt">&lt;/title&gt;</span>
    <span class="nt">&lt;/head&gt;</span>
    <span class="nt">&lt;body&gt;</span>
        <span class="nt">&lt;div</span> <span class="na">id=</span><span class="s">"app"</span><span class="nt">&gt;&lt;/div&gt;</span>

        <span class="c">&lt;!-- This is a single-line comment --&gt;</span>

        <span class="nt">&lt;script&gt;</span>
            <span class="nb">document</span><span class="p">.</span><span class="nf">getElementById</span><span class="p">(</span><span class="dl">"</span><span class="s2">app</span><span class="dl">"</span><span class="p">).</span><span class="nx">innerHTML</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">&lt;h1&gt;Hello, World!&lt;/h1&gt;</span><span class="dl">"</span><span class="p">;</span>
        <span class="nt">&lt;/script&gt;</span>
    <span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="scss">SCSS</h3>

<p>SCSS (Sassy CSS) extends CSS with variables and nested rules.</p>

<div class="language-scss highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="rouge-code"><pre><span class="k">@use</span> <span class="s2">"sass:math"</span><span class="p">;</span>

<span class="c1">// This is a single-line comment</span>

<span class="nv">$font-size</span><span class="p">:</span> <span class="m">16px</span><span class="p">;</span>
<span class="cm">/* $line-height: 1.7rem; */</span>
<span class="nv">$line-height</span><span class="p">:</span> <span class="m">1</span><span class="mi">.5</span><span class="p">;</span>
<span class="nv">$text-color</span><span class="p">:</span> <span class="mh">#121212</span><span class="p">;</span>
<span class="nv">$background-color</span><span class="p">:</span> <span class="mh">#f1f1f1</span><span class="p">;</span>

<span class="nt">body</span> <span class="p">{</span>
    <span class="nl">font</span><span class="p">:</span> <span class="m">400</span> <span class="si">#{</span><span class="nv">$font-size</span><span class="si">}</span><span class="o">/</span><span class="si">#{</span><span class="nv">$line-height</span><span class="si">}</span> <span class="s2">"Lato"</span><span class="o">,</span> <span class="s2">"Arial"</span><span class="o">,</span> <span class="nb">sans-serif</span><span class="p">;</span>
    <span class="nl">color</span><span class="p">:</span> <span class="nv">$text-color</span><span class="p">;</span>
    <span class="nl">background-color</span><span class="p">:</span> <span class="nv">$background-color</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">figcaption</span> <span class="p">{</span> <span class="k">@extend</span> <span class="nv">%small-font-size</span><span class="p">;</span> <span class="p">}</span>

<span class="nv">%small-font-size</span> <span class="p">{</span>
  <span class="nl">font-size</span><span class="p">:</span> <span class="n">math</span><span class="o">.</span><span class="nf">clamp</span><span class="p">(</span><span class="m">-1in</span><span class="o">,</span> <span class="m">1cm</span><span class="o">,</span> <span class="m">10mm</span><span class="p">);</span> <span class="c1">// 10mm</span>
<span class="p">}</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="javascript">JavaScript</h3>

<p>JavaScript is a scripting language used for creating interactive web applications.</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="rouge-code"><pre><span class="c1">// This is a single-line comment</span>

<span class="kd">class</span> <span class="nc">Person</span> <span class="p">{</span>
    <span class="nf">constructor</span><span class="p">(</span><span class="nx">name</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span><span class="p">;</span>
    <span class="p">}</span>

    <span class="nf">greet</span><span class="p">()</span> <span class="p">{</span>
        <span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="s2">`Hello, </span><span class="p">${</span><span class="k">this</span><span class="p">.</span><span class="nx">name</span><span class="p">}</span><span class="s2">!`</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="kd">const</span> <span class="nx">person</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Person</span><span class="p">(</span><span class="dl">"</span><span class="s2">John</span><span class="dl">"</span><span class="p">);</span>
<span class="nx">person</span><span class="p">.</span><span class="nf">greet</span><span class="p">();</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="bash">Bash</h3>

<p>Bash scripts are used for automating tasks in Unix-based systems.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
</pre></td><td class="rouge-code"><pre><span class="c">#!/usr/bin/env bash</span>

person<span class="o">(</span><span class="nv">$1</span><span class="o">)</span> <span class="o">{</span>
    <span class="nb">echo</span> <span class="s2">"Hello, </span><span class="nv">$1</span><span class="s2">"</span>
<span class="o">}</span>

<span class="c"># This is a single-line comment</span>
person<span class="o">(</span><span class="s2">"John"</span><span class="o">)</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="powershell">PowerShell</h3>

<p>PowerShell scripts are the powerfull of shell.</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
</pre></td><td class="rouge-code"><pre><span class="kr">function</span><span class="w"> </span><span class="nf">Write-Person</span><span class="w"> </span><span class="p">{</span><span class="w">
    </span><span class="kr">param</span><span class="w"> </span><span class="p">(</span><span class="w">
        </span><span class="p">[</span><span class="n">string</span><span class="p">]</span><span class="nv">$Name</span><span class="w">
    </span><span class="p">)</span><span class="w">

    </span><span class="n">Write-Host</span><span class="w"> </span><span class="s2">"Hello, </span><span class="nv">$Name</span><span class="s2">"</span><span class="w">
</span><span class="p">}</span><span class="w">

</span><span class="c"># This is a single-line comment</span><span class="w">
</span><span class="n">Write-Person</span><span class="p">(</span><span class="s2">"John"</span><span class="p">)</span><span class="w">
</span></pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="php">PHP</h3>

<p>PHP is a server-side scripting language used for web development.</p>

<div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="rouge-code"><pre><span class="cp">&lt;?php</span>
<span class="c1">// This is a single-line comment</span>

<span class="kd">class</span> <span class="nc">Person</span> <span class="p">{</span>
    <span class="k">private</span> <span class="nv">$name</span><span class="p">;</span>

    <span class="k">public</span> <span class="k">function</span> <span class="n">__construct</span><span class="p">(</span><span class="nv">$name</span><span class="p">)</span> <span class="p">{</span>
        <span class="nv">$this</span><span class="o">-&gt;</span><span class="n">name</span> <span class="o">=</span> <span class="nv">$name</span><span class="p">;</span>
    <span class="p">}</span>

    <span class="k">public</span> <span class="k">function</span> <span class="n">greet</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">echo</span> <span class="s2">"Hello, </span><span class="si">{</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="n">name</span><span class="si">}</span><span class="s2">!"</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="nv">$person</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Person</span><span class="p">(</span><span class="s1">'John'</span><span class="p">);</span>
<span class="nv">$person</span><span class="o">-&gt;</span><span class="nf">greet</span><span class="p">();</span>
<span class="cp">?&gt;</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="ruby">Ruby</h3>

<p>Ruby is an object-oriented programming language known for its simplicity.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="rouge-code"><pre><span class="cm">=begin
This is a multi-line comment
that spans multiple lines
=end</span>

<span class="k">class</span> <span class="nc">Person</span>
  <span class="nb">attr_reader</span> <span class="ss">:name</span> <span class="c1"># This is a single-line comment</span>

  <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
    <span class="vi">@name</span> <span class="o">=</span> <span class="nb">name</span>
  <span class="k">end</span>

  <span class="k">def</span> <span class="nf">greet</span>
    <span class="nb">puts</span> <span class="s2">"Hello, </span><span class="si">#{</span><span class="vi">@name</span><span class="si">}</span><span class="s2">!"</span>
  <span class="k">end</span>
<span class="k">end</span>

<span class="n">person</span> <span class="o">=</span> <span class="no">Person</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="s1">'John'</span><span class="p">)</span>
<span class="n">person</span><span class="p">.</span><span class="nf">greet</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<h3 id="python">Python</h3>

<p>Python is a versatile, high-level programming language used in many domains.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="rouge-code"><pre><span class="sh">"""</span><span class="s">
This is a multi-line comment
that spans multiple lines
</span><span class="sh">"""</span>

<span class="k">class</span> <span class="nc">Person</span><span class="p">:</span>
    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="n">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
        <span class="n">self</span><span class="p">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span> <span class="c1"># This is a single-line comment
</span>
    <span class="k">def</span> <span class="nf">greet</span><span class="p">(</span><span class="n">self</span><span class="p">):</span>
        <span class="nf">print</span><span class="p">(</span><span class="sa">f</span><span class="sh">"</span><span class="s">Hello, </span><span class="si">{</span><span class="n">self</span><span class="p">.</span><span class="n">name</span><span class="si">}</span><span class="s">!</span><span class="sh">"</span><span class="p">)</span>

<span class="n">person</span> <span class="o">=</span> <span class="nc">Person</span><span class="p">(</span><span class="sh">'</span><span class="s">John</span><span class="sh">'</span><span class="p">)</span>
<span class="n">person</span><span class="p">.</span><span class="nf">greet</span><span class="p">()</span>
</pre></td></tr></tbody></table></code></pre></div></div>

<p>For further language list support <a href="https://rouge-ruby.github.io/docs/file.Languages.html">here</a></p>]]></content><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><category term="test" /><category term="rouge" /><category term="jekyll" /><summary type="html"><![CDATA[A pure Ruby code highlighter that is compatible with Pygments]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="/assets/img/posts/thumb-rouge.jpg" /><media:content medium="image" url="/assets/img/posts/thumb-rouge.jpg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Some articles are just so long they deserve a really long title to see if things will break well</title><link href="/blog/super-long-article/" rel="alternate" type="text/html" title="Some articles are just so long they deserve a really long title to see if things will break well" /><published>2022-05-20T00:00:00+09:00</published><updated>2022-05-20T00:00:00+09:00</updated><id>/blog/super-long-article</id><content type="html" xml:base="/blog/super-long-article/"><![CDATA[<p>Labore mollit elit enim aliqua occaecat ea veniam do elit. Anim id cupidatat Lorem ex. Ullamco ullamco minim deserunt aliqua. Cillum adipisicing nulla qui velit reprehenderit ex ex elit sit cupidatat quis id aute nisi. Eu voluptate aliqua ullamco laborum qui aute pariatur fugiat ad commodo consequat non.</p>

<p>Esse tempor deserunt mollit reprehenderit tempor ea et anim magna consectetur cillum nisi do. Et exercitation cupidatat duis labore eiusmod. Consequat consequat esse esse officia velit.</p>

<p>Veniam nulla magna eiusmod labore exercitation nostrud elit nisi consequat. Fugiat amet quis aliqua sint anim non ut ullamco nisi. Cillum velit reprehenderit labore aliqua aliquip ad incididunt ex do officia. Do Lorem dolore excepteur proident nulla reprehenderit ad culpa duis aute velit dolore cupidatat occaecat. Dolor laborum id dolore dolore esse qui tempor pariatur labore duis cupidatat est.</p>

<p>Cillum aute nulla pariatur elit labore sunt eu do cupidatat minim dolore dolore laboris. Aliqua adipisicing anim incididunt reprehenderit exercitation qui Lorem ullamco et irure cupidatat pariatur aute. Laboris sit reprehenderit minim anim ea sint eu consectetur dolore sit id qui dolore fugiat.</p>

<p>Anim irure nisi minim officia reprehenderit consectetur. Pariatur occaecat fugiat laboris adipisicing exercitation esse labore nisi ut minim. Laborum mollit in enim culpa quis. Reprehenderit sint pariatur sint sit quis exercitation adipisicing. Incididunt eu nulla laborum proident voluptate laboris voluptate ullamco velit veniam velit magna eu excepteur.</p>

<p>Ea irure pariatur aliquip mollit nostrud esse duis aliquip. Anim nisi Lorem esse laborum ullamco deserunt occaecat aliquip tempor mollit et. Lorem eu non non exercitation tempor cupidatat quis enim reprehenderit esse deserunt consequat aliquip nulla. Ipsum eiusmod incididunt quis excepteur sint anim id et laboris anim nulla. Nisi non quis et culpa ullamco.</p>

<p>Proident ullamco aliquip ut qui occaecat in do cillum excepteur. Excepteur ea id eiusmod culpa irure aliqua nulla in ad nulla sit. Non voluptate cillum velit tempor nostrud. Duis dolore ea dolor ipsum sunt aliqua pariatur officia duis id sunt. Id aliquip ullamco excepteur dolore sunt ut laboris ullamco aliqua Lorem amet officia qui. Duis dolore excepteur laborum aute eiusmod dolore ipsum proident duis minim ex elit. Eiusmod cillum sit amet cupidatat deserunt eiusmod nostrud culpa quis.</p>

<p>Eiusmod anim sit irure laborum officia tempor eu ad exercitation laboris excepteur velit. Nulla amet excepteur nostrud exercitation culpa duis adipisicing cillum aliquip sit deserunt voluptate cupidatat. Amet elit esse occaecat esse duis in tempor non commodo. Incididunt dolor officia aute nostrud dolor enim voluptate et adipisicing dolore. Duis irure fugiat laboris amet do proident aliqua et. Adipisicing non minim amet minim.</p>

<p>Eiusmod duis excepteur ea est fugiat elit laborum ex est. Mollit ea deserunt laboris occaecat eu. Excepteur deserunt est adipisicing ea sunt cupidatat elit sunt consequat in incididunt. Sit magna elit eu reprehenderit enim fugiat. Commodo ea aliqua proident laboris. Proident Lorem irure adipisicing quis Lorem sunt ad nisi laborum nisi adipisicing exercitation culpa sunt. Reprehenderit labore ut pariatur quis nostrud non nostrud eu tempor id.</p>

<p>Enim laborum elit mollit do tempor aliqua irure excepteur laborum. Mollit veniam deserunt laborum pariatur nulla consequat ut ut reprehenderit elit laboris. Ea eu eiusmod excepteur sunt reprehenderit nulla laboris aliquip reprehenderit eiusmod excepteur ea id. Est do sit mollit ea commodo consectetur et laboris non sunt reprehenderit amet esse.</p>]]></content><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><category term="test" /><category term="jekyll" /><summary type="html"><![CDATA[Labore mollit elit enim aliqua occaecat ea veniam do elit. Anim id cupidatat Lorem ex. Ullamco ullamco minim deserunt aliqua. Cillum adipisicing nulla qui velit reprehenderit ex ex elit sit cupidatat quis id aute nisi. Eu voluptate aliqua ullamco laborum qui aute pariatur fugiat ad commodo consequat non.]]></summary></entry><entry><title type="html">Some articles are just so short that we have to make the footer stick</title><link href="/blog/super-short-article/" rel="alternate" type="text/html" title="Some articles are just so short that we have to make the footer stick" /><published>2022-05-19T00:00:00+09:00</published><updated>2022-05-19T00:00:00+09:00</updated><id>/blog/super-short-article</id><content type="html" xml:base="/blog/super-short-article/"><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>]]></content><author><name>Andre Attamimi</name><email>rumatua0@gmail.com</email></author><category term="test" /><category term="jekyll" /><summary type="html"><![CDATA[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]></summary></entry></feed>