Commit 5124bd64 authored by ASN.1 Documenter's avatar ASN.1 Documenter
Browse files

add power sign support

parent 4c08068b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ RE_DOXY_C_COMMENTS = re.compile(r'^\s*/\*\*\s(.*?)\*/', re.MULTILINE | re.DOTALL

RE_DOXY_C_COMMENTS_I = re.compile(r'\s*\*+')
RE_STRIPSTAR = re.compile(r'^\s*\*', re.MULTILINE)
RE_POWER_SIGN = re.compile('\^(-?\w+|\(.*?\))')


RE_DOXY_REF = re.compile(r'@ref\s+([\w-]+)')
@@ -64,7 +65,6 @@ extTypes = {}
cpos = 0
o_args = []
m_options = []
f_options = []

def urlquote(s):
	if (sys.version_info > (3, 0)):
@@ -89,6 +89,8 @@ def parseText(content, indent=None):
	
	content = RE_DOXY_STRIP_SINGLE_TAG.sub('', content)

	content = RE_POWER_SIGN.sub('<sup>\\1</sup>', content)

	return indentLines(content, indent)

def parseInlineComments(content:str, indent=None):
@@ -232,7 +234,6 @@ def parseModule(mname, content):
					if typeBody is not None:
						fTitle = ''
						field = ''
						suffix = ''
						pos = 0
						for fm in RE_FIELDS.finditer(typeBody):
							if fm.group(1) is not None: