diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-08-18 00:14:43 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-08-19 14:20:26 -0700 |
commit | a4fcea412239f6936ab0dd0d21abda912e22bd47 (patch) | |
tree | 11a644ceceb962e3124e8e98b5a9bb7aa139d142 /platform/darwin/scripts | |
parent | aa03f0cab704f45bc7fbc2878cf7256e310f6dce (diff) | |
download | qtlocation-mapboxgl-a4fcea412239f6936ab0dd0d21abda912e22bd47.tar.gz |
[ios, macos] Refer to attributes in kebab-case
Fixes #5951.
Diffstat (limited to 'platform/darwin/scripts')
-rw-r--r-- | platform/darwin/scripts/generate-style-code.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js index dd634fd69b..77c1ee5a1d 100644 --- a/platform/darwin/scripts/generate-style-code.js +++ b/platform/darwin/scripts/generate-style-code.js @@ -87,6 +87,16 @@ global.testArrayImplementation = function (property) { } }; +global.propertyDoc = function (property, layerType) { + let doc = property.doc.replace(/`(.+?)`/g, function (m, symbol, offset, str) { + if (!('values' in property && property.values.indexOf(symbol) !== -1) && str.substr(offset - 4, 3) !== 'CSS') { + symbol = camelizeWithLeadingLowercase(symbol); + } + return '`' + symbol + '`'; + }); + return doc; +}; + global.propertyType = function (property, _private) { return _private ? `id <MGLStyleAttributeValue, MGLStyleAttributeValue_Private>` : `id <MGLStyleAttributeValue>`; }; |