Skip to content

Commit 6ec1287

Browse files
committed
[docs] refactor over-prefetching docs syntax highlighting
1 parent 25367f4 commit 6ec1287

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

site/src/_includes/components/over-prefetching.njk

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,32 @@
77

88
{{ "* Indicating a specific DOM element to observe, with the `options.el` parameter:" | markdown | safe }}
99

10-
{% markdownConvert %}
11-
```js
10+
{% highlight "js" %}
1211
quicklink.listen({
1312
el: document.getElementById('content')
1413
});
15-
```
16-
{% endmarkdownConvert %}
14+
{% endhighlight %}
1715

1816
{{ "* Passing an `options.limit` parameter, indicating the total number of requests that can be prefetched while observing the `options.el` container:" | markdown | safe }}
1917

20-
{% markdownConvert %}
21-
```js
18+
{% highlight "js" %}
2219
quicklink.listen({
2320
limit: 5
2421
});
25-
```
26-
{% endmarkdownConvert %}
22+
{% endhighlight %}
2723

2824
{{ "* Using `options.throttle`, to establish a concurrency limit for simultaneous requests while observing the `options.el` container:" | markdown | safe }}
2925

30-
{% markdownConvert %}
31-
```js
26+
{% highlight "js" %}
3227
quicklink.listen({
3328
throttle: 2
3429
});
35-
```
36-
{% endmarkdownConvert %}
30+
{% endhighlight %}
3731

3832
{{ "If none of these configuration options suits your needs, you can call `quicklink.prefetch()`, passing a single URL or an array of URLs to prefetch. Invoking `quicklink` this way, bypasses the `Intersection Observer` logic, giving you full control on the prefetch requests to be made:" | markdown | safe }}
3933

40-
{% markdownConvert %}
41-
```js
34+
{% highlight "js" %}
4235
quicklink.prefetch(['2.html', '3.html', '4.js']);
43-
```
44-
{% endmarkdownConvert %}
36+
{% endhighlight %}
4537

4638
{% endblock %}

0 commit comments

Comments
 (0)