REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.72 KB
Close
/opt/imunify360/venv/lib/python3.11/site-packages/docutils/parsers/commonmark_wrapper.py
Text
Base64
#! /usr/bin/env python3 # :Copyright: © 2022 Günter Milde. # :License: Released under the terms of the `2-Clause BSD license`_, in short: # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # This file is offered as-is, without any warranty. # # .. _2-Clause BSD license: https://opensource.org/licenses/BSD-2-Clause # # Revision: $Revision: 9048 $ # Date: $Date: 2022-03-29 23:50:15 +0200 (Di, 29. Mär 2022) $ """ An interface for parsing CommonMark input. Select a locally installed parser from the following 3rd-party parser packages: :pycmark: https://pypi.org/project/pycmark/ :myst: https://pypi.org/project/pycmark/ :recommonmark: https://pypi.org/project/pycmark/ (unmaintained, deprecated) The first parser class that can be successfully imported is mapped to `commonmark_wrapper.Parser`. This module is provisional: the API is not settled and may change with any minor Docutils version. """ import docutils.parsers commonmark_parser_names = ('pycmark', 'myst', 'recommonmark') """Names of compatible drop-in CommonMark parsers""" Parser = None parser_name = '' for name in commonmark_parser_names: try: Parser = docutils.parsers.get_parser_class(name) except ImportError: continue parser_name = name break if Parser is None: raise ImportError( 'Parsing "CommonMark" requires one of the packages\n' f'{commonmark_parser_names} available at https://pypi.org') if parser_name == 'myst': if not Parser.settings_defaults: Parser.settings_defaults = {} Parser.settings_defaults['myst_commonmark_only'] = True
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
rst
DIR
-
drwxr-xr-x
2026-05-27 11:04:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-05-27 11:04:30
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
commonmark_wrapper.py
1.72 KB
lrw-r--r--
2026-04-14 09:45:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
null.py
445 B
lrw-r--r--
2026-04-14 09:45:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
recommonmark_wrapper.py
5.30 KB
lrw-r--r--
2026-04-14 09:45:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
3.64 KB
lrw-r--r--
2026-04-14 09:45:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).