From 878a536f58c0094aa813d7396cbf2fc2caa31008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Mon, 15 Apr 2024 16:35:59 +0200 Subject: [PATCH] docs: Small fix to snippet converting from Qt.Url to string On Windows we need to remove three slashes. --- docs/scripting-doc/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/scripting-doc/index.d.ts b/docs/scripting-doc/index.d.ts index 3da2282c9a..c6042e6fe5 100644 --- a/docs/scripting-doc/index.d.ts +++ b/docs/scripting-doc/index.d.ts @@ -455,7 +455,7 @@ declare namespace Qt { * case you need a local file path, you can use the following code: * * ```js - * var path = url.toString().replace(/^file:\/{2}/, ''); + * var path = url.toString().replace(/^file:\/{3}/, (tiled.platform == 'windows') ? '' : '/');; * ``` * * Or have a look at whether an alternative property is available that