summaryrefslogtreecommitdiff
path: root/platform/darwin/scripts
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-24 13:07:34 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-25 13:22:17 -0800
commit7684bc2125a020bf44e2a99cbd49f7b3618ba52e (patch)
tree86abf37d9139208fc078ea90c30162004fe4da81 /platform/darwin/scripts
parentf5bcf186f63f0f10642dcee14a680667c36cbfdb (diff)
downloadqtlocation-mapboxgl-7684bc2125a020bf44e2a99cbd49f7b3618ba52e.tar.gz
[ios, macos] Testify MGLMapView gesture recognizer example
Diffstat (limited to 'platform/darwin/scripts')
-rw-r--r--platform/darwin/scripts/update-examples.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/scripts/update-examples.js b/platform/darwin/scripts/update-examples.js
index 6291326068..e6b747a460 100644
--- a/platform/darwin/scripts/update-examples.js
+++ b/platform/darwin/scripts/update-examples.js
@@ -108,10 +108,10 @@ function completeExamples(os) {
}
// Resolve conditional compilation blocks.
- example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\n/gm,
+ example = example.replace(/^(\s*)#if\s+os\((iOS|macOS)\)\n([^]*?)(?:^\1#else\n([^]*?))?^\1#endif\b\n?/gm,
function (m, indentation, ifOs, ifCase, elseCase) {
return (os === ifOs ? ifCase : elseCase).replace(new RegExp('^ ', 'gm'), '');
- });
+ }).replace(/\n$/, '');
// Insert the test method contents into the documentation comment just
// above the substructure.