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

Added plugin templates

Works like $INCLUDE, but for help text. Meant to outsource recurring text into a template and plug it in where needed.
This commit is contained in:
Roland Heyder 2022-07-16 23:42:05 +02:00
parent 11dae1ccbf
commit d6d9c15a14

View file

@ -7,7 +7,7 @@ FUNCTION Back2BackName$ (a$)
END FUNCTION
FUNCTION Wiki$ (PageName$) 'Read cached wiki page (download, if not yet cached)
Help_PageLoaded$ = PageName$
IF LEFT$(PageName$, 9) <> "Template:" THEN Help_PageLoaded$ = PageName$
'Escape all invalid and other critical chars in filenames
PageName2$ = ""
@ -702,6 +702,15 @@ SUB WikiParse (a$) 'Wiki page interpret
Help_Bold = 0: Help_Italic = 0: col = Help_Col
END IF
'Template wrapped plugin
IF RIGHT$(cb$, 6) = "Plugin" AND Help_LockParse = 0 THEN 'no plugins in blocks
pit$ = Wiki$("Template:" + cb$)
IF INSTR(pit$, "{{PageInternalError}}") = 0 THEN
a$ = LEFT$(a$, i) + pit$ + RIGHT$(a$, LEN(a$) - i)
n = n + LEN(pit$)
END IF
END IF
'Template wrapped table
IF RIGHT$(cb$, 5) = "Table" AND Help_LockParse = 0 THEN 'no table info in blocks
Help_LinkN = Help_LinkN + 1