@@ -788,7 +788,7 @@ pro htmlizer::ProcessString, text, $
788
788
if (i eq 0 ) then begin
789
789
; we made it this far, check if we are in parenthesis or not
790
790
; if we are, we are not the start of the string, i.e. (this.that()).method,
791
- posParen = stregex (text , '\(([^)]+)\)' , LENGTH = lParen)
791
+ posParen = stregex (str_orig , '\(([^)]+)\)' , LENGTH = lParen)
792
792
793
793
; set our start flag accordingly
794
794
case (1 ) of
@@ -851,7 +851,7 @@ pro htmlizer::ProcessString, text, $
851
851
if (i eq 0 ) then begin
852
852
; we made it this far, check if we are in parenthesis or not
853
853
; if we are, we are not the start of the string, i.e. (this.that()).method,
854
- posParen = stregex (text , '\(([^)]+)\)' , LENGTH = lParen)
854
+ posParen = stregex (str_orig , '\(([^)]+)\)' , LENGTH = lParen)
855
855
856
856
; set our start flag accordingly
857
857
case (1 ) of
@@ -1680,15 +1680,21 @@ function HTMLizer::HTMLize, textArr,$
1680
1680
str_orig = ''
1681
1681
endelse
1682
1682
1683
+ ; initialize our flag for the strings start
1684
+ ; we can have syntax of the form (someFunc()).proMethod which
1685
+ ; should still include .proMethod as a method to check
1686
+ start_flag = 1
1687
+
1683
1688
; iterate over each good portion of the line
1684
1689
foreach subStr, strings, j do begin
1690
+ ; make sure we can process our substring
1685
1691
if (process[j]) then begin
1686
1692
; add color to the string
1687
1693
self.processString, subStr, $
1688
1694
CONTINUATION = continuation,$
1689
1695
TOOLTIPS = tooltips,$
1690
1696
DOCS_LINKS = docs_links,$
1691
- STRING_START = j eq 0 ,$
1697
+ STRING_START = start_flag ,$
1692
1698
IDL_CONSOLE = idl_console,$
1693
1699
STR_ORIG = str_orig
1694
1700
@@ -1835,7 +1841,6 @@ inputFile = file_which('python__define.pro')
1835
1841
1836
1842
; read in plot.pro
1837
1843
strings = htmlizer_read_file(inputFile)
1838
- strings = '(it->expects())->toFindInArray, scalar'
1839
1844
1840
1845
; initialize the object
1841
1846
html = htmlizer()
0 commit comments