Skip to content

Commit 0ea4d19

Browse files
author
Waylan Limberg
committed
Fixed a few typos in the using_as_module docs.
1 parent 0110f03 commit 0ea4d19

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

docs/using_as_module.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Using Markdown as Python Library
2-
================================
1+
Using Markdown as a Python Library
2+
====================++============
33

44
First and foremost, Python-Markdown is intended to be a python library module
55
used by various projects to convert Markdown syntax into HTML.
@@ -17,7 +17,7 @@ The Details
1717

1818
Python-Markdown provides two public functions (`markdown.markdown` and
1919
`markdown.markdownFromFile`) both of which wrap the public class
20-
`markdown.Markdown`. If your processing one document at a time, the
20+
`markdown.Markdown`. If you're processing one document at a time, the
2121
functions will serve your needs. However, if you need to process
2222
multiple documents, it may be advantageous to create a single instance
2323
of the `markdown.Markdown` class and pass multiple documents through it.
@@ -50,7 +50,7 @@ The following options are available on the `markdown.markdown` function:
5050
Python-Markdown provides an API for third parties to write extensions to
5151
the parser adding their own additions or changes to the syntax. A few
5252
commonly used extensions are shipped with the markdown library. See
53-
the extension documentation for a list of available extensions.
53+
the [extension documentation](extensions) for a list of available extensions.
5454

5555
The list of extensions may contain instances of extensions or stings of
5656
extension names. If an extension name is provided as a string, the
@@ -137,7 +137,7 @@ The following options are available on the `markdown.markdown` function:
137137

138138
* `enable_attributes`: Enable the conversion of attributes. Default: True
139139

140-
* `smart_emphasis`: Treat `_connected_words_` intelegently Default: True
140+
* `smart_emphasis`: Treat `_connected_words_` intelligently Default: True
141141

142142
* `lazy_ol`: Ignore number of first item of ordered lists. Default: True
143143

@@ -162,8 +162,8 @@ The following options are available on the `markdown.markdown` function:
162162
### `markdown.markdownFromFile(**kwargs)`
163163

164164
With a few exceptions, `markdown.markdownFromFile` accepts the same options as
165-
`markdown.markdown`. It does **not** accept a `text` string. Instead, it accepts
166-
the following required options:
165+
`markdown.markdown`. It does **not** accept a `text` (or Unicode) string.
166+
Instead, it accepts the following required options:
167167

168168
* `input` (required): The source text file.
169169

@@ -173,7 +173,7 @@ the following required options:
173173
* a readable file-like object,
174174
* or `None` (default) which will read from `stdin`.
175175

176-
* `output`: The target which output to written to.
176+
* `output`: The target which output is written to.
177177

178178
`output` may be set to one of three options:
179179

@@ -182,13 +182,13 @@ the following required options:
182182
* or `None` (default) which will write to `stdout`.
183183

184184
* `encoding`: The encoding of the source text file. Defaults to
185-
"utf-8". The same encoding will always be used for the output file.
185+
"utf-8". The same encoding will always be used for input and output.
186186
The 'xmlcharrefreplace' error handler is used when encoding the output.
187187

188188
**Note:** This is the only place that decoding and encoding of unicode
189189
takes place in Python-Markdown. If this rather naive solution does not
190-
meet your special needs, it is suggested that you write your own code
191-
to handle your specific encoding/decoding needs.
190+
meet your specific needs, it is suggested that you write your own code
191+
to handle your encoding/decoding needs.
192192

193193
### `markdown.Markdown([**kwargs])`
194194

@@ -215,6 +215,10 @@ must be passed to one of two instance methods:
215215
html1 = md.convert(text1)
216216
md.reset()
217217
html2 = md.convert(text2)
218+
219+
You can also change calls to `reset` togeather:
220+
221+
html3 = md.reset().convert(text3)
218222

219223
* `Markdown.convertFile(**kwargs)`
220224

@@ -223,4 +227,4 @@ must be passed to one of two instance methods:
223227
`encoding`). As with the `convert` method, this method should be used to
224228
process multiple files without creating a new instance of the class for
225229
each document. State may need to be `reset` between each call to
226-
`convertFile` as with `convert`.
230+
`convertFile` as is the case with `convert`.

0 commit comments

Comments
 (0)