by byte-one » Mon Jan 05, 2009 1:44 pm
Antonio, please replace this modified function to helpchm.prg
- Code: Select all Expand view
static function ExtHtm( cTopic ) //modified to accept anchors (z.B. cTopic#one or cTopic.htm#one )
//from byte-one, 2009
local nPos,cTemp
if at("#",cTopic) > 0 //if anchor in cTopic
nPos := at("#",cTopic)
cTemp := subs(cTopic,1,nPos-1) //extract string before "#"
cTemp += if(".htm" $ lower( cTemp ),"",".htm") //add ".htm" if not exist
cTopic := cTemp + subs(cTopic,nPos,len(cTopic)) //add "#anchor" to cTopic
else
cTopic += if(".htm" $ lower( cTopic ),"",".htm") //add ".htm" if not exist
endif
return (cTopic)