50 titleFullPath=False, |
51 titleFullPath=False, |
51 ): |
52 ): |
52 """ |
53 """ |
53 Public method to generate HTML for the source editor. |
54 Public method to generate HTML for the source editor. |
54 |
55 |
55 @param tabSize size of tabs (integer) |
56 @param tabSize size of tabs |
56 @param useTabs flag indicating the use of tab characters (boolean) |
57 @type int |
57 @param wysiwyg flag indicating colorization (boolean) |
58 @param useTabs flag indicating the use of tab characters |
|
59 @type bool |
|
60 @param wysiwyg flag indicating colorization |
|
61 @type bool |
58 @param folding flag indicating usage of fold markers |
62 @param folding flag indicating usage of fold markers |
|
63 @type bool |
59 @param onlyStylesUsed flag indicating to include only style |
64 @param onlyStylesUsed flag indicating to include only style |
60 definitions for styles used in the source (boolean) |
65 definitions for styles used in the source |
|
66 @type bool |
61 @param titleFullPath flag indicating to include the full file path |
67 @param titleFullPath flag indicating to include the full file path |
62 in the title tag (boolean) |
68 in the title tag |
63 @return generated HTML text (string) |
69 @type bool |
|
70 @return generated HTML text |
|
71 @rtype str |
64 """ |
72 """ |
65 self.editor.recolor(0, -1) |
73 self.editor.recolor(0, -1) |
66 |
74 |
67 lengthDoc = self.editor.length() |
75 lengthDoc = self.editor.length() |
68 styleIsUsed = {} |
76 styleIsUsed = {} |
403 |
411 |
404 def __init__(self, editor, parent=None): |
412 def __init__(self, editor, parent=None): |
405 """ |
413 """ |
406 Constructor |
414 Constructor |
407 |
415 |
408 @param editor reference to the editor object (QScintilla.Editor.Editor) |
416 @param editor reference to the editor object |
409 @param parent parent object of the exporter (QObject) |
417 @type QScintilla.Editor.Editor |
|
418 @param parent parent object of the exporter |
|
419 @type QObject |
410 """ |
420 """ |
411 ExporterBase.__init__(self, editor, parent) |
421 ExporterBase.__init__(self, editor, parent) |
412 |
422 |
413 def exportSource(self): |
423 def exportSource(self): |
414 """ |
424 """ |
499 |
509 |
500 def __generateFromReSTDocutils(self): |
510 def __generateFromReSTDocutils(self): |
501 """ |
511 """ |
502 Private method to convert ReST text into HTML using 'docutils'. |
512 Private method to convert ReST text into HTML using 'docutils'. |
503 |
513 |
504 @return processed HTML (string) |
514 @return processed HTML |
|
515 @rtype str |
505 """ |
516 """ |
506 if "sphinx" in sys.modules: |
517 if "sphinx" in sys.modules: |
507 # Make sure any Sphinx polution of docutils has been removed. |
518 # Make sure any Sphinx polution of docutils has been removed. |
508 unloadKeys = [ |
519 unloadKeys = [ |
509 k for k in sys.modules if k.startswith(("docutils", "sphinx")) |
520 k for k in sys.modules if k.startswith(("docutils", "sphinx")) |