Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed May 29, 2016
1 parent 9545212 commit c206a67
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/pages/examples/sanitize.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sanitize a filename
----------------------------

The :py:func:`.sanitize_filename()` function replace invalid character(s)
The :py:func:`.sanitize_filename()` function is replaced invalid character(s)
for a filename within the argument.

.. include:: sanitize_filename_code.txt
Expand All @@ -10,7 +10,7 @@ for a filename within the argument.
Sanitize a file path
----------------------------

The :py:func:`.sanitize_file_path()` function replace invalid character(s)
The :py:func:`.sanitize_file_path()` function is replaced invalid character(s)
for a file path within the argument.

.. include:: sanitize_file_path_code.txt
Expand All @@ -19,7 +19,15 @@ for a file path within the argument.
Sanitize a variable name
----------------------------

The :py:func:`.sanitize_python_var_name()` function replace invalid character(s)
The :py:func:`.sanitize_python_var_name()` function is replaced invalid character(s)
for a python variable within the argument.

.. include:: sanitize_var_name_code.txt


Replace symbols
----------------------------

The :py:func:`.replace_symbol()` function is replaced symbol(s) within the argument.

.. include:: sanitize_replace_symbol_code.txt
11 changes: 11 additions & 0 deletions docs/pages/examples/sanitize_replace_symbol_code.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. code-block:: python
:caption: Sample code

import pathvalidate

print(pathvalidate.replace_symbol("_a*b:c<d>e%f/(g)h+i_0.txt"))

.. code-block:: none
:caption: Output

abcdefghi0txt

0 comments on commit c206a67

Please sign in to comment.