Skip to content

Commit baae63b

Browse files
committed
fix
1 parent dc20a94 commit baae63b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

mercure.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Subscribing to updates in JavaScript from a Twig template is straightforward:
267267
<script>
268268
269269
The ``mercure()`` Twig function will generate the URL of the Mercure hub according to the configuration.
270-
The URL will include the ``topic`` query parameters corresponding to to thee topics passed as first argument.
270+
The URL will include the ``topic`` query parameters corresponding to the topics passed as first argument.
271271

272272
If you want to access to this URL from an external JavaScript file, generate the URL in a dedicated HTML element:
273273

@@ -291,13 +291,12 @@ as patterns:
291291
292292
<script>
293293
{# Subscribe to updates of several Book resources and to all Review resources matching the given pattern #}
294-
const eventSource = new EventSource("{{ mercure(
295-
[
296-
'https://example.com/books/1',
297-
'https://example.com/books/2',
298-
'https://example.com/reviews/{id}'
299-
]
300-
)|escape('js') }}");
294+
const eventSource = new EventSource("{{ mercure([
295+
'https://example.com/books/1',
296+
'https://example.com/books/2',
297+
'https://example.com/reviews/{id}'
298+
])|escape('js') }}");
299+
301300
eventSource.onmessage = event => {
302301
console.log(JSON.parse(event.data));
303302
}

0 commit comments

Comments
 (0)