TheOdinProject / theodinproject

Main Website for The Odin Project
http://www.theodinproject.com
MIT License
3.56k stars 2.06k forks source link

Fix: Add `ejs` to Prism language configuration #4498

Closed JoshDevHub closed 2 months ago

JoshDevHub commented 2 months ago

Because

Code examples using ejs weren't being given proper syntax highlighting.

This PR

Issue

Closes #4497

Additional Information

Pull Request Requirements

JoshDevHub commented 2 months ago

To QA:

  1. Visit the preview tool in the review app (the path is /lessons/preview)
  2. Paste this code in. Fence it with triple backticks and add the language ejs after the opening set of backticks:

    <nav>
    <ul>
     <% for (let i = 0; i < links.length; i++) { %>
       <li>
         <a href="<%= links[i].href %>">
           <span> <%= links[i].text %> </span>
         </a>
       </li>
     <% } %>
    </ul>
    </nav>
    1. Preview the markup and confirm that there's highlighting.

    Here's what it currently looks like on main for comparison: image