1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Merge pull request #93 from QB64-Phoenix-Edition/wiki-dev

Fixes to blank line checks.
This commit is contained in:
Roland Heyder 2022-06-04 12:34:21 +02:00 committed by GitHub
commit f1464252d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 10 deletions

View file

@ -5,7 +5,7 @@ IF _DIREXISTS("internal") = 0 THEN GOTO NoInternalFolder
IF _DIREXISTS(Cache_Folder$) = 0 THEN MKDIR Cache_Folder$
DIM SHARED Help_sx, Help_sy, Help_cx, Help_cy
DIM SHARED Help_Select, Help_cx1, Help_cy1, Help_SelX1, Help_SelX2, Help_SelY1, Help_SelY2
DIM SHARED Help_MSelect
DIM SHARED Help_MSelect, Help_ChkBlank
Help_sx = 1: Help_sy = 1: Help_cx = 1: Help_cy = 1
DIM SHARED Help_wx1, Help_wy1, Help_wx2, Help_wy2 'defines the text section of the help window on-screen
DIM SHARED Help_ww, Help_wh 'width & height of text region

View file

@ -132,6 +132,7 @@ END FUNCTION
SUB Help_AddTxt (t$, col, link) 'Add help text, handle word wrap
IF t$ = CHR$(13) THEN Help_NewLine: EXIT SUB
IF Help_ChkBlank <> 0 THEN Help_CheckBlankLine: Help_ChkBlank = 0
FOR i = 1 TO LEN(t$)
c = ASC(t$, i)
@ -202,12 +203,14 @@ SUB Help_NewLine 'Start a new help line, apply indention (if any)
END IF
Help_Pos = 1
IF Help_Center > 0 THEN 'center overrides regular indent
Help_NewLineIndent = 0
Help_AddTxt SPACE$(ASC(Help_CIndent$, 1)), Help_Col, 0
Help_CIndent$ = MID$(Help_CIndent$, 2)
ELSEIF Help_NewLineIndent > 0 THEN
Help_AddTxt SPACE$(Help_NewLineIndent), Help_Col, 0
IF Help_ChkBlank = 0 THEN 'no indention on blank line checks
IF Help_Center > 0 THEN 'center overrides regular indent
Help_NewLineIndent = 0
Help_AddTxt SPACE$(ASC(Help_CIndent$, 1)), Help_Col, 0
Help_CIndent$ = MID$(Help_CIndent$, 2)
ELSEIF Help_NewLineIndent > 0 THEN
Help_AddTxt SPACE$(Help_NewLineIndent), Help_Col, 0
END IF
END IF
END SUB
@ -271,7 +274,7 @@ SUB WikiParse (a$) 'Wiki page interpret
Help_Underline = 0
Help_BG_Col = 0
Help_Center = 0: Help_CIndent$ = ""
Help_DList = 0
Help_DList = 0: Help_ChkBlank = 0
link = 0: elink = 0: cb = 0: nl = 1
@ -703,7 +706,9 @@ SUB WikiParse (a$) 'Wiki page interpret
END IF
IF iii <> 0 THEN
FOR ii = Help_Txt_Len - 3 TO 1 STEP -4
IF ASC(Help_Txt$, ii) = 13 AND iii < 0 THEN
IF ASC(Help_Txt$, ii) = 32 AND iii < 0 THEN
Help_Pos = Help_Pos - 1
ELSEIF ASC(Help_Txt$, ii) = 13 AND iii < 0 THEN
help_h = help_h - 1: Help_Line$ = LEFT$(Help_Line$, LEN(Help_Line$) - 4)
ELSEIF ASC(Help_Txt$, ii) = 196 AND iii < 0 THEN
iii = -iii
@ -753,14 +758,17 @@ SUB WikiParse (a$) 'Wiki page interpret
'Rulers
IF c$(4) = "----" AND nl = 1 THEN
i = i + 3
Help_CheckBlankLine
Help_AddTxt STRING$(Help_ww, 196), 8, 0
Help_ChkBlank = 1
GOTO charDone
END IF
IF c$(4) = "<hr>" OR c$(6) = "<hr />" THEN
IF c$(4) = "<hr>" THEN i = i + 3
IF c$(6) = "<hr />" THEN i = i + 5
Help_CheckFinishLine
Help_CheckBlankLine
Help_AddTxt STRING$(Help_ww, 196), 8, 0
Help_ChkBlank = 1
GOTO charDone
END IF
END IF