Skip to content

Commit

Permalink
generate pre in CSSSyntax (mdn#3244)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo authored and peterbe committed Jun 1, 2021
1 parent be20e5c commit 79f3ebc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kumascript/macros/CSSSyntax.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -433,4 +433,8 @@ if (!formattedSyntax) {
throw new Error(`No syntax found in DB for '${name}'`);
}
%><%- formattedSyntax %>
const rtlLocales = ['ar', 'he', 'fa'];
const rtl = rtlLocales.includes(env.locale);
const out = `<pre${rtl ? ' dir="rtl"' : ""}>${formattedSyntax}</pre>`
%><%- out %>

0 comments on commit 79f3ebc

Please sign in to comment.