Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/markdown_it/presets/zero.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

4 statements  

1""" 

2"Zero" preset, with nothing enabled. Useful for manual configuring of simple 

3modes. For example, to parse bold/italic only. 

4""" 

5 

6from ..utils import PresetType 

7 

8 

9def make() -> PresetType: 

10 return { 

11 "options": { 

12 "maxNesting": 20, # Internal protection, recursion limit 

13 "html": False, # Enable HTML tags in source 

14 # 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 links 

17 # used by the replacements and smartquotes rules: 

18 # Enable some language-neutral replacements + quotes beautification 

19 "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 renderer 

27 "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 blocks 

30 # 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 }