Skip to content

Commit b021959

Browse files
committed
runtime: fix docs
1 parent baebffa commit b021959

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

fluent.runtime/docs/usage.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,16 @@ form input may have a value, but also a placeholder attribute, aria-label
280280
attribute, and maybe a title attribute.
281281

282282
.. code-block:: python
283+
283284
>>> l10n = DemoLocalization("""
284-
... login-input = Predefined value
285-
... .placeholder = { $email }
286-
... .aria-label = Login input value
287-
... .title = Type your login email
288-
""")
285+
... login-input = Predefined value
286+
... .placeholder = { $email }
287+
... .aria-label = Login input value
288+
... .title = Type your login email
289+
... """)
289290
>>> value, attributes = l10n.format_message(
290-
"login-input", {"email": "email@example.com"}
291-
)
291+
... "login-input", {"email": "email@example.com"}
292+
... )
292293
>>> value
293294
'Predefined value'
294295
>>> attributes
@@ -297,9 +298,10 @@ attribute, and maybe a title attribute.
297298
You can also use the formatted message without unpacking it.
298299

299300
.. code-block:: python
301+
300302
>>> fmt_msg = l10n.format_message(
301-
"login-input", {"email": "email@example.com"}
302-
)
303+
... "login-input", {"email": "email@example.com"}
304+
... )
303305
>>> fmt_msg.value
304306
'Predefined value'
305307
>>> fmt_msg.attributes

0 commit comments

Comments
 (0)