Fix RST code-block rendering for (read) examples

Also removed trailing whitespace and added a blank line to separate the discrete examples
This commit is contained in:
Tianon Gravi 2014-08-19 02:55:47 -06:00
parent aafb16d69f
commit cf7e5ed3c0

View File

@ -915,12 +915,14 @@ Raises an `EOFError` if `from-file` ends before a complete expression can be
parsed. parsed.
.. code-block:: hy .. code-block:: hy
=> (read) => (read)
(+ 2 2) (+ 2 2)
('+' 2 2) ('+' 2 2)
=> (eval (read)) => (eval (read))
(+ 2 2) (+ 2 2)
4 4
=> (import io) => (import io)
=> (def buffer (io.StringIO "(+ 2 2)\n(- 2 1)")) => (def buffer (io.StringIO "(+ 2 2)\n(- 2 1)"))
=> (eval (apply read [] {"from_file" buffer})) => (eval (apply read [] {"from_file" buffer}))