src/eric7/UI/CodeDocumentationViewerTemplate.py

branch
eric7
changeset 10928
46651e194fbe
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10927:ce599998be7d 10928:46651e194fbe
9 9
10 import os 10 import os
11 11
12 from PyQt6.QtCore import QCoreApplication 12 from PyQt6.QtCore import QCoreApplication
13 13
14 from eric7 import Utilities 14 from eric7 import EricUtilities
15 from eric7.EricWidgets.EricApplication import ericApp 15 from eric7.EricWidgets.EricApplication import ericApp
16 16
17 _stylesheetsCache = { 17 _stylesheetsCache = {
18 "dark": "", 18 "dark": "",
19 "light": "", 19 "light": "",
108 108
109 name = documentationInfo["name"] 109 name = documentationInfo["name"]
110 if name: 110 if name:
111 title = titleTemplate.replace("@NAME@", name) 111 title = titleTemplate.replace("@NAME@", name)
112 if "argspec" in documentationInfo and documentationInfo["argspec"]: 112 if "argspec" in documentationInfo and documentationInfo["argspec"]:
113 argspec = Utilities.html_encode(documentationInfo["argspec"]) 113 argspec = EricUtilities.html_encode(documentationInfo["argspec"])
114 for char in ["=", ",", "(", ")", "*", "**"]: 114 for char in ["=", ",", "(", ")", "*", "**"]:
115 argspec = argspec.replace( 115 argspec = argspec.replace(
116 char, '<span class="argspec-highlight">{0}</span>'.format(char) 116 char, '<span class="argspec-highlight">{0}</span>'.format(char)
117 ) 117 )
118 argspec = argspecTemplate.replace("@NAME@", name).replace( 118 argspec = argspecTemplate.replace("@NAME@", name).replace(

eric ide

mercurial