From dc2451cea6ae360dd76b23617820b53b18363d49 Mon Sep 17 00:00:00 2001 From: Cory Smith Date: Fri, 2 Sep 2022 21:20:45 -0500 Subject: [PATCH] More wiki updates. - fixed the by usage page not loading in some cases. - remove SUB Help_PreView; appears to be unused. - fixed downloaded file being incorrectly saved with txt extension. --- source/ide/ide_methods.bas | 2 +- source/ide/wiki/wiki_methods.bas | 54 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 49bf366b9..74ef18f58 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -5315,7 +5315,7 @@ FUNCTION ide2 (ignore) END IF IF menu$(m, s) = "#Keywords By Usage" THEN PCOPY 3, 0: SCREEN , , 3, 0 - lnk$ = "Keyword Reference - By usage" + lnk$ = "Keyword Reference - By Usage" GOTO OpenHelpLnk END IF diff --git a/source/ide/wiki/wiki_methods.bas b/source/ide/wiki/wiki_methods.bas index 89aba908d..44cd2a82e 100644 --- a/source/ide/wiki/wiki_methods.bas +++ b/source/ide/wiki/wiki_methods.bas @@ -87,7 +87,7 @@ FUNCTION Wiki$ (PageName$) url$ = CHR$(34) + wikiBaseAddress$ + "/" + PageName2$ + ".md" + CHR$(34) - outputFile$ = Cache_Folder$ + "/" + PageName2$ + ".txt" + outputFile$ = Cache_Folder$ + "/" + PageName2$ + ".md" SHELL _HIDE "curl -L -o " + CHR$(34) + outputFile$ + CHR$(34) + " " + url$ fh = FREEFILE @@ -183,34 +183,34 @@ SUB Help_NewLine END SUB -SUB Help_PreView +' SUB Help_PreView ' Does not appear to be in use. - OPEN "help_preview.txt" FOR OUTPUT AS #1 - FOR i = 1 TO LEN(Help_Txt$) STEP 4 - c = ASC(Help_Txt$, i) - c$ = CHR$(c) - IF c = 13 THEN c$ = CHR$(13) + CHR$(10) - PRINT #1, c$; - NEXT - CLOSE #1 +' OPEN "help_preview.txt" FOR OUTPUT AS #1 +' FOR i = 1 TO LEN(Help_Txt$) STEP 4 +' c = ASC(Help_Txt$, i) +' c$ = CHR$(c) +' IF c = 13 THEN c$ = CHR$(13) + CHR$(10) +' PRINT #1, c$; +' NEXT +' CLOSE #1 - CLS - FOR i = 1 TO LEN(Help_Txt$) STEP 4 - c = ASC(Help_Txt$, i) - col = ASC(Help_Txt$, i + 1) - IF c = 13 THEN - COLOR col AND 15, col \ 16 - PRINT SPACE$(help_w - POS(0)); - COLOR 7, 0 - PRINT SPACE$(_WIDTH - POS(0) + 1); - COLOR col AND 15, col \ 16 - SLEEP - ELSE - COLOR col AND 15, col \ 16 - PRINT CHR$(c); - END IF - NEXT -END SUB +' CLS +' FOR i = 1 TO LEN(Help_Txt$) STEP 4 +' c = ASC(Help_Txt$, i) +' col = ASC(Help_Txt$, i + 1) +' IF c = 13 THEN +' COLOR col AND 15, col \ 16 +' PRINT SPACE$(help_w - POS(0)); +' COLOR 7, 0 +' PRINT SPACE$(_WIDTH - POS(0) + 1); +' COLOR col AND 15, col \ 16 +' SLEEP +' ELSE +' COLOR col AND 15, col \ 16 +' PRINT CHR$(c); +' END IF +' NEXT +' END SUB FUNCTION Help_Col 'helps to calculate the default color