Skip to content

Commit c9c5597

Browse files
authored
docs: fix table generation (#479)
1 parent d2d31e8 commit c9c5597

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

docs/MapView.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,10 @@
1616
| pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map |
1717
| rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map |
1818
| attributionEnabled | `boolean` | `true` | `false` | Enable/Disable attribution on map.<br/><br/>This must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.<br/>Other providers do not require this. |
19-
| attributionPosition | `\| { top?: number; left?: number }
20-
\| { top?: number; right?: number }
21-
\| { bottom?: number; left?: number }
22-
\| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
19+
| attributionPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map |
2320
| tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor |
2421
| logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. |
25-
| logoPosition | `\| { top?: number; left?: number }
26-
\| { top?: number; right?: number }
27-
\| { bottom?: number; left?: number }
28-
\| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
22+
| logoPosition | `{ top?: number; left?: number } \| { top?: number; right?: number } \| { bottom?: number; left?: number } \| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map |
2923
| compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map |
3024
| compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight |
3125
| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values |

docs/ShapeSource.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
| ---- | :--: | :-----: | :------: | :----------: |
88
| id | `string` | `MapLibreGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
99
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
10-
| shape | `\| GeoJSON.GeometryCollection
11-
\| GeoJSON.Feature
12-
\| GeoJSON.FeatureCollection
13-
\| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
10+
| shape | `GeoJSON.GeometryCollection \| GeoJSON.Feature \| GeoJSON.FeatureCollection \| GeoJSON.Geometry` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
1411
| cluster | `boolean` | `none` | `false` | Enables clustering on the source for point shapes. |
1512
| clusterRadius | `number` | `none` | `false` | Specifies the radius of each cluster if clustering is enabled.<br/>A value of 512 produces a radius equal to the width of a tile.<br/>The default value is 50. |
1613
| clusterMaxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to cluster points if clustering is enabled.<br/>Defaults to one zoom level less than the value of maxZoomLevel so that, at the maximum zoom level,<br/>the shapes are not clustered. |

scripts/utils/template-globals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ function _propMarkdownTableRows(props, prefix = "") {
451451
const { description = "" } = prop;
452452
let result = `| ${prefix}${
453453
prop.name
454-
} | \`${type}\` | \`${defaultValue}\` | \`${
454+
} | \`${type.replace(/^\\\| /, "").replace(/\n/g, " ")}\` | \`${defaultValue}\` | \`${
455455
prop.required
456456
}\` | ${replaceNewLine(description)} |`;
457457
if (type === "shape") {

0 commit comments

Comments
 (0)