Browse Source

Unicode links (#25099)

* Fix Arabic links with unicode link text

* Change alignmnet of text in code blocks to initial even in rtl
Shai Daniel Ghelberg 2 năm trước cách đây
mục cha
commit
e73e77c31f
3 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 3 3
      docs/manual/ar/buildTools/Testing-with-NPM.html
  2. 1 0
      docs/page.css
  3. 1 1
      docs/page.js

+ 3 - 3
docs/manual/ar/buildTools/Testing-with-NPM.html

@@ -123,7 +123,7 @@ $ npm install three --save-dev
 							<code>
  $ npm install [email protected] --save
 							</code>
-							(0.84.0 في هذا المثال). - حفظ يجعل هذا تبعية لهذا المشروع ، بدلاً من dev تبعية. انظر المستندات هنا [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json here] لمزيد من المعلومات.
+							(0.84.0 في هذا المثال). - حفظ يجعل هذا تبعية لهذا المشروع ، بدلاً من dev تبعية. انظر المستندات [link:https://docs.npmjs.com/cli/v8/configuring-npm/package-json هنا] لمزيد من المعلومات.
 						</li>
 					</ul>
 				</li>
@@ -173,12 +173,12 @@ The THREE object should be able to construct a Vector3 with default of x=0: 0ms
 				<li>
 					اكتب اختبارًا للسلوك المتوقع لشفرتك ، وضعه تحت test/.
 					هنا مثال من مشروع حقيقي
-					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js Here].
+					[link:https://github.com/air/encounter/blob/master/test/Physics-test.js هنا].
 				</li>
 
 				<li>
 					قم بتصدير الكود الوظيفي الخاص بك بطريقة يمكن للعقدة js رؤيتها ، لاستخدامها مع طلب.
-					شاهده هنا [link:https://github.com/air/encounter/blob/master/js/Physics.js here].
+					شاهده [link:https://github.com/air/encounter/blob/master/js/Physics.js هنا].
 				</li>
 
 				<li>

+ 1 - 0
docs/page.css

@@ -76,6 +76,7 @@ body.rtl table {
 }
 body.rtl code {
 	direction: ltr !important;
+	text-align: initial;
 }
 
 a {

+ 1 - 1
docs/page.js

@@ -70,7 +70,7 @@ function onDocumentLoad() {
 	text = text.replace( /\[param:([\w\.]+) ([\w\.\s]+)\]/gi, '$2 : <a class="param" onclick="window.parent.setUrlFragment(\'$1\')">$1</a>' ); // [param:name title]
 
 	text = text.replace( /\[link:([\w\:\/\.\-\_\(\)\?\#\=\!\~]+)\]/gi, '<a href="$1" target="_blank">$1</a>' ); // [link:url]
-	text = text.replace( /\[link:([\w\:\/\.\-\_\(\)\?\#\=\!\~]+) ([\w\:\/\.\-\_\'\s]+)\]/gi, '<a href="$1" target="_blank">$2</a>' ); // [link:url title]
+	text = text.replace( /\[link:([\w:/.\-_()?#=!~]+) ([\w\p{L}:/.\-_'\s]+)\]/giu, '<a href="$1" target="_blank">$2</a>' ); // [link:url title]
 	text = text.replace( /\*([\w\d\"\-\(][\w\d\ \/\+\-\(\)\=\,\."]*[\w\d\"\)]|\w)\*/gi, '<strong>$1</strong>' ); // *text*
 	text = text.replace( /\`(.*?)\`/gi, '<code class="inline">$1</code>' ); // `code`