Skip to content

Commit b117f81

Browse files
authored
Fix readme code blocks (#5)
The code blocks were erroneously quoted, not shown as code blocks. This patch fixes the ReST formatting of the code blocks.
1 parent 41c742c commit b117f81

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ The Abstract Syntax Tree and parsing functionality lives in ``express_schema.par
5454

5555
Example:
5656

57+
.. code-block::
58+
5759
>>> import express_schema.parse as parse
5860
>>>
5961
>>> # Define a simple EXPRESS schema as a string
@@ -73,7 +75,10 @@ Example:
7375
>>> if errors is not None:
7476
... print("Parsing errors occurred:")
7577
... for error in errors:
76-
... print(f" Line {error.line}, Column {error.column}: {error.message}")
78+
... print(
79+
... f" Line {error.line}, Column {error.column}: "
80+
... f"{error.message}"
81+
... )
7782
... else:
7883
... print("Schema parsed successfully!")
7984
... print(f"Schema name: {schema.identifier}")
@@ -136,6 +141,8 @@ If, for some reason, you only want to tokenize and not parse the schema, you can
136141

137142
Example:
138143

144+
.. code-block::
145+
139146
>>> import express_schema.lex as lex
140147
>>>
141148
>>> # Define a simple EXPRESS schema text to tokenize
@@ -154,7 +161,10 @@ Example:
154161
... print(f"Number of tokens: {len(tokens)}")
155162
... print("First few tokens:")
156163
... for token in tokens[:5]:
157-
... print(f" {token.kind.name} at {token.position}: {token.text!r}")
164+
... print(
165+
... f" {token.kind.name} at {token.position}: "
166+
... f"{token.text!r}"
167+
... )
158168
... else:
159169
... print("Tokenization failed!")
160170
Tokenization successful!

0 commit comments

Comments
 (0)