Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
zero.py45 linesDownload Raw Back to presets
1"""2"Zero" preset, with nothing enabled. Useful for manual configuring of simple3modes. For example, to parse bold/italic only.4"""5 6from ..utils import PresetType7 8 9def make() -> PresetType:10    return {11        "options": {12            "maxNesting": 20,  # Internal protection, recursion limit13            "html": False,  # Enable HTML tags in source14            # this is just a shorthand for .disable(["html_inline", "html_block"])15            # used by the linkify rule:16            "linkify": False,  # autoconvert URL-like texts to links17            # used by the replacements and smartquotes rules:18            # Enable some language-neutral replacements + quotes beautification19            "typographer": False,20            # used by the smartquotes rule:21            # Double + single quotes replacement pairs, when typographer enabled,22            # and smartquotes on. Could be either a String or an Array.23            # For example, you can use '«»„“' for Russian, '„“‚‘' for German,24            # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).25            "quotes": "\u201c\u201d\u2018\u2019",  # /* “”‘’ */26            # Renderer specific; these options are used directly in the HTML renderer27            "xhtmlOut": False,  # Use '/' to close single tags (<br />)28            "breaks": False,  # Convert '\n' in paragraphs into <br>29            "langPrefix": "language-",  # CSS language prefix for fenced blocks30            # Highlighter function. Should return escaped HTML,31            # or '' if the source string is not changed and should be escaped externally.32            # If result starts with <pre... internal wrapper is skipped.33            # function (/*str, lang, attrs*/) { return ''; }34            "highlight": None,35        },36        "components": {37            "core": {"rules": ["normalize", "block", "inline", "text_join"]},38            "block": {"rules": ["paragraph"]},39            "inline": {40                "rules": ["text"],41                "rules2": ["balance_pairs", "fragments_join"],42            },43        },44    }45 
codekingpro/portable-devtools · Team Ai