diff --git a/docs/_theme/index.js b/docs/_theme/index.js
index 189da35f5e4..c53646d6d84 100644
--- a/docs/_theme/index.js
+++ b/docs/_theme/index.js
@@ -57,10 +57,10 @@ module.exports = function (comments, options, callback) {
},
md: function (ast, inline) {
if (inline && ast && ast.children.length && ast.children[0].type === 'paragraph') {
- return formatMarkdown({
+ ast = {
type: 'root',
- children: ast.children[0].children
- }, namespaces);
+ children: ast.children[0].children.concat(ast.children.slice(1))
+ };
}
return formatMarkdown(ast, namespaces);
},
diff --git a/js/ui/map.js b/js/ui/map.js
index dff42424be4..070862be750 100644
--- a/js/ui/map.js
+++ b/js/ui/map.js
@@ -35,13 +35,17 @@ var defaultMaxZoom = 20;
* @param {string|Element} options.container HTML element to initialize the map in (or element id as string)
* @param {number} [options.minZoom=0] Minimum zoom of the map
* @param {number} [options.maxZoom=20] Maximum zoom of the map
- * @param {Object|string} [options.style] Map style. This must be an an object conforming to the schema described in the [style reference](https://mapbox.com/mapbox-gl-style-spec/), or a URL to a JSON style. To load a style from the Mapbox API, you can use a URL of the form `mapbox://styles/:owner/:style`, where `:owner` is your Mapbox account name and `:style` is the style ID. Or you can use one of [the predefined Mapbox styles](https://www.mapbox.com/maps/). The Style URLs of Mapbox default styles are:
- * • `mapbox://styles/mapbox/streets-v9`
- * • `mapbox://styles/mapbox/outdoors-v9`
- * • `mapbox://styles/mapbox/light-v9`
- * • `mapbox://styles/mapbox/dark-v9`
- * • `mapbox://styles/mapbox/satellite-v9`
- * • `mapbox://styles/mapbox/satellite-streets-v9`
+ * @param {Object|string} [options.style] Map style. This must be an an object conforming to the schema described in
+ * the [style reference](https://mapbox.com/mapbox-gl-style-spec/), or a URL to a JSON style. To load a style from the
+ * Mapbox API, you can use a URL of the form `mapbox://styles/:owner/:style`, where `:owner` is your Mapbox account
+ * name and `:style` is the style ID. Or you can use one of [the predefined Mapbox styles](https://www.mapbox.com/maps/).
+ * The Style URLs of the predefined Mapbox styles are:
+ * * `mapbox://styles/mapbox/streets-v9`
+ * * `mapbox://styles/mapbox/outdoors-v9`
+ * * `mapbox://styles/mapbox/light-v9`
+ * * `mapbox://styles/mapbox/dark-v9`
+ * * `mapbox://styles/mapbox/satellite-v9`
+ * * `mapbox://styles/mapbox/satellite-streets-v9`
* @param {boolean} [options.hash=false] If `true`, the map will track and update the page URL according to map position
* @param {boolean} [options.interactive=true] If `false`, no mouse, touch, or keyboard listeners are attached to the map, so it will not respond to input
* @param {number} [options.bearingSnap=7] Snap to north threshold in degrees.
@@ -396,23 +400,36 @@ util.extend(Map.prototype, /** @lends Map.prototype */{
},
/**
- * Query rendered features within a point or rectangle.
+ * Query rendered features at a point or within a rectangle.
*
* @param {Point|Array|Array|Array>} [pointOrBox] - The geometry of a query region:
* either [x, y] pixel coordinates of a point, or [[x1, y1], [x2, y2]] pixel coordinates of opposite corners of
* a bounding rectangle. Omitting this parameter (i.e. calling `queryRenderedFeatures` with zero arguments,
* or with a single `params` argument), is equivalent to passing a bounding rectangle encompassing the entire
* viewport.
- * @param {Object} params
+ * @param {Object} [params]
* @param {Array} [params.layers] Only query features from layers with these layer IDs.
- * @param {Array} [params.filter] A mapbox-gl-style-spec filter.
+ * @param {Array} [params.filter] A [filter](https://www.mapbox.com/mapbox-gl-style-spec/#types-filter).
+ *
+ * @returns {Array