@@ -35,6 +35,19 @@ func get_field(row, key)
3535 get_field = result
3636end
3737
38+ func fix_comments(comments)
39+ comments = translate(comments, "p. " , "" )
40+ comments = translate(comments, "bq. " , "" )
41+ comments = translate(comments, "bc. " , "" )
42+ comments = translate(comments, "bc.. " , "" )
43+ comments = translate(comments, "\\\"", " \ "" )
44+ comments = translate(comments, " " , " " )
45+ comments = translate(comments, "<code>" , "--Example--" + chr( 10 ))
46+ comments = translate(comments, "</code>" , chr( 10 ) + "--End Of Example--" )
47+ comments = translate(comments, NL, chr( 10 ))
48+ fix_comments = comments
49+ end
50+
3851sub mk_help( byref in_map)
3952 local in_map_len = len(in_map) - 1
4053 for i = 0 to in_map_len
5164sub mk_text_reference( byref in_map)
5265 local NL = "\\r\\n"
5366 local in_map_len = len(in_map) - 1
67+ local end_block = "<!-- end heading block -->"
5468
5569 ? "SmallBASIC Language reference"
5670 ? "See: http://smallbasic.sourceforge.net/?q=node/201"
@@ -69,13 +83,13 @@ sub mk_text_reference(byref in_map)
6983 ?
7084 ? brief
7185 ?
86+ pos = instr(row, end_block) + len(end_block)
87+ if (pos < len(row)) then
88+ ? fix_comments(mid(row, pos))
89+ endif
7290 comments = in_map(i).comment_body_value
7391 if (comments != "NULL" ) then
74- comments = translate(comments, " " , " " )
75- comments = translate(comments, "<code>" , "--Example--" + chr( 10 ))
76- comments = translate(comments, "</code>" , chr( 10 ) + "--End Of Example--" )
77- comments = translate(comments, NL, chr( 10 ))
78- ? comments
92+ ? fix_comments(comments)
7993 endif
8094 next i
8195end
0 commit comments