1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-09 21:15:12 +00:00

Add Interwiki link support

- wikipedia pages can be linked simply as Winkipedia:page instead of the full URL
- advantage: the new syntax can be used in internal links as well and will automatically expanded into external links when clicked
This commit is contained in:
Roland Heyder 2023-02-02 00:02:05 +01:00
parent ceb3d18c1e
commit 01ed59c1d3

View file

@ -534,7 +534,11 @@ SUB WikiParse (a$) 'Wiki page interpret
END IF
Help_LinkN = Help_LinkN + 1
Help_Link$ = Help_Link$ + "PAGE:" + link$ + Help_Link_Sep$
IF LEFT$(link$, 10) = "Wikipedia:" THEN 'expand Wikipedia as external links
Help_Link$ = Help_Link$ + "EXTL:https://en.wikipedia.org/wiki/" + MID$(link$, 11) + Help_Link_Sep$
ELSE ' 'else as internal help page link
Help_Link$ = Help_Link$ + "PAGE:" + link$ + Help_Link_Sep$
END IF
IF Help_LockParse = 0 THEN
Help_AddTxt text$, Help_Col_Link, Help_LinkN