From f1f6cf8a48d66255db9654281a0ea3e3b59db12b Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Mon, 30 Nov 2020 00:30:30 +0700 Subject: [PATCH] fix(docs): display text direction correctly (#40345) --- docs/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 6fc8b94084eeac..3f03303abeb2cd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -134,13 +134,20 @@ // Used from https://github.com/ckoliber/docsify-rtl/blob/master/build/docsify-rtl.js, // Currently this is a hack because can't use the plugin as is. - if (vm.route.path.search('Arabic') !== -1) { + if (vm.route.path.search('Arabic') !== -1 || vm.route.path.search('Hebrew') !== -1) { for (var counter = 0, elements = document.getElementsByClassName("markdown-section"); counter < elements.length; counter++) { var item = elements[counter]; item.dir = "rtl"; } }; + if (vm.route.path.search('Arabic') === -1 && vm.route.path.search('Hebrew') === -1) { + for (var counter = 0, elements = document.getElementsByClassName("markdown-section"); counter < elements.length; counter++) { + var item = elements[counter]; + item.dir = "ltr"; + } + }; + return ( markdown + '\n----\n' +