Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
caffe2.python.docs.parser.Parser Class Reference
Inheritance diagram for caffe2.python.docs.parser.Parser:

Public Member Functions

def __init__ (self, text, formatter)
 
def parseText (self)
 
def parse (self)
 

Public Attributes

 text
 
 lines
 
 formatter
 

Static Public Attributes

list regexes
 

Detailed Description

Definition at line 10 of file parser.py.

Member Data Documentation

list caffe2.python.docs.parser.Parser.regexes
static
Initial value:
1 = [
2  # Code blocks of various formats
3  ('````(.+?)````',
4  lambda m, f: f.addCode(m.group(1))
5  ),
6  ('```(.+?)```',
7  lambda m, f: f.addCode(m.group(1))
8  ),
9  (r'((( {2})+)(\S.*)(\n\s*\n|\n))+',
10  lambda m, f: f.addCode(m.group(0))
11  ),
12  (r'([^\.])\n',
13  lambda m, f: f.addRaw('{c} '.format(c=m.group(1))) or True
14  ),
15  ('`(.+?)`',
16  lambda m, f: f.addCode(m.group(1), True)
17  ),
18  # Make links clickable
19  ('http[s]?://(?:[a-zA-Z]|[0-9]|[[email protected]&+]'
20  r'|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+',
21  lambda m, f: f.addLink(m.group(0), m.group(0))
22  ),
23  (r'\*\*(.+?)\*\*',
24  lambda m, f: f.addEmphasis(m.group(1), 2)
25  ),
26  (r'\*(.+?)\*',
27  lambda m, f: f.addEmphasis(m.group(1), 1)
28  ),
29  ]

Definition at line 14 of file parser.py.


The documentation for this class was generated from the following file: