-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
2,662 additions
and
1,703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
ReST directive for creating line break in your documentation when needed. | ||
The directive does note require any argument. | ||
Example:: | ||
.. line-break:: | ||
""" | ||
|
||
from docutils import nodes | ||
from docutils.parsers.rst import Directive, directives | ||
|
||
|
||
class LineBreak(Directive): | ||
has_content = False | ||
required_arguments = 0 | ||
optional_arguments = 0 | ||
final_argument_whitespace = False | ||
option_spec = {} | ||
html = "<br/>" | ||
|
||
def run(self): | ||
""" | ||
ReST directive for creating line break in your documentation when needed. The directive does note require any argument. | ||
Example: | ||
.. line-break::""" | ||
|
||
has_content: bool = False | ||
"directive have no content" | ||
|
||
required_arguments: int = 0 | ||
"directive have no arguments" | ||
|
||
optional_arguments: int = 0 | ||
"directive have no optional arguments" | ||
|
||
final_argument_whitespace: bool = False | ||
"directive have no whitspaces between arguments" | ||
|
||
option_spec: dict = {} | ||
"no option specs" | ||
|
||
html: str = "<br/>" | ||
"the html code to inject in the output" | ||
|
||
def run(self) -> list: | ||
return [nodes.raw("", self.html, format="html")] | ||
|
||
|
||
def setup(builder): | ||
def setup(builder) -> None: | ||
directives.register_directive("line-break", LineBreak) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.