summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-09-30 18:20:47 -0700
committerGitHub <noreply@github.com>2016-09-30 18:20:47 -0700
commit132954b56340ff6d883a325c0f64ed7ce1aa3072 (patch)
tree5dd77f3f1ac5191997ac46095bb0d3dcd0229219
parentee4715a821437e6ed374231fad2ca6193eeac499 (diff)
downloadqtlocation-mapboxgl-132954b56340ff6d883a325c0f64ed7ce1aa3072.tar.gz
[ios, macos] Loosened style doc transform regex (#6543)
Mildly decoupled the transformation from the style specification to the format required for iOS/macOS documentation so it’s harder for style specification references to other properties’ values to fall through the cracks. Fixes #6541.
-rw-r--r--platform/darwin/scripts/generate-style-code.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index 7fca6021df..a801145dec 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -86,10 +86,10 @@ global.testHelperMessage = function (property, layerType, isFunction) {
global.propertyDoc = function (propertyName, property, layerType) {
// Match references to other property names & values.
// Requires the format 'When `foo` is set to `bar`,'.
- let doc = property.doc.replace(/When `(.+?)` is set to `(.+?)`,/g, function (m, peerPropertyName, propertyValue, offset, str) {
+ let doc = property.doc.replace(/`([^`]+?)` is set to `([^`]+?)`/g, function (m, peerPropertyName, propertyValue, offset, str) {
let otherProperty = camelizeWithLeadingLowercase(peerPropertyName);
let otherValue = objCType(layerType, peerPropertyName) + camelize(propertyValue);
- return 'When `' + `${otherProperty}` + '` is set to `' + `${otherValue}` + '`,';
+ return '`' + `${otherProperty}` + '` is set to `' + `${otherValue}` + '`';
});
// Match references to our own property values.
// Requires the format 'is equivalent to `bar`'.