antsibull-docutils 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ # Author: Felix Fontein <felix@fontein.de>
2
+ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or
3
+ # https://www.gnu.org/licenses/gpl-3.0.txt)
4
+ # SPDX-License-Identifier: GPL-3.0-or-later
5
+ # SPDX-FileCopyrightText: 2020, Ansible Project
6
+
7
+ """
8
+ Ansible Changelog Tool.
9
+ """
10
+
11
+ __version__ = "1.0.0"
12
+
13
+ __all__ = ("__version__",)
@@ -0,0 +1,30 @@
1
+ # Author: Felix Fontein <felix@fontein.de>
2
+ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or
3
+ # https://www.gnu.org/licenses/gpl-3.0.txt)
4
+ # SPDX-License-Identifier: GPL-3.0-or-later
5
+ # SPDX-FileCopyrightText: 2024, Ansible Project
6
+
7
+ """
8
+ MarkDown utilities.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from html import escape as _html_escape
14
+
15
+
16
+ def html_escape(text: str) -> str:
17
+ """
18
+ Escape a text for HTML.
19
+ """
20
+ return _html_escape(text).replace("&quot;", '"')
21
+
22
+
23
+ def html_argument_escape(text: str) -> str:
24
+ """
25
+ Escape a text for HTML inside an argument delimited with double quotes (").
26
+ """
27
+ return _html_escape(text)
28
+
29
+
30
+ __all__ = ("html_escape", "html_argument_escape")