💥 feat!: force code blocks LTR rendering (#412)

BREAKING CHANGE: Code blocks default to LTR. Set `force_codeblock_ltr = false` to keep previous behaviour.
This commit is contained in:
Óscar
2024-10-18 16:34:11 +02:00
committed by welpo
parent 34514c1869
commit 092ccdd1ba
8 changed files with 55 additions and 1 deletions

View File

@@ -15,11 +15,18 @@ This variable will hold all the text strings for the language #}
{%- endif -%}
{% set rtl_languages = ["ar", "arc", "az", "dv", "ff", "he", "ku", "nqo", "fa", "rhg", "syc", "ur"] %}
{#- Necessary for the hierarchy macro -#}
{%- if page -%}
{%- set current_page = page -%}
{%- else -%}
{%- set current_page = ""-%}
{%- endif -%}
<!DOCTYPE html>
<html lang="{{ lang }}" {% if config.extra.default_theme -%}
data-theme="{{config.extra.default_theme}}"
{%- endif -%}>
{%- endif -%}{% if macros_settings::evaluate_setting_priority(setting="force_codeblock_ltr", page=current_page, default_global_value=true) == "false" -%}
data-code-direction="inherit"{% endif %}>
{% include "partials/header.html" %}

View File

@@ -63,6 +63,7 @@ Current section extra: {% if current_section %}{{ current_section.extra | json_e
{% set settings_to_test = [
"footnote_backlinks",
"add_src_to_code_block",
"force_codeblock_ltr",
"copy_button",
"katex",
"quick_navigation_buttons",