[Gambas-user] Add ToConsole to TextHighlighter class in gb.eval.highlight
Brian G
brian at westwoodsvcs.com
Tue Jul 7 17:37:23 CEST 2020
I have attached a copy again with a different encoding I hope this is better.
The code is completely terminal agnostic and uses only well published escape sequences.
So here is the code again, It has functioned correctly on every single terminal I have tested it upon( that is all I could find in linux domain),
Except the console page of Gambas IDE where it only displayed what looked like shades of grey, bold and underline. but did not fail.
I also attach a text application project source code archive.
Thank You
Brian G
Tuesday, 07 July 2020, 01:11AM -07:00 from Benoît Minisini [ mailto:g4mba5 at gmail.com | g4mba5 at gmail.com ] :
Le 07/07/2020 à 00:25, Brian G a écrit :
> I would like to add a function :
>
> Public Sub ToConsole(Text As String, Optional Styles As
> TextHighlighterStyle[]) As String
>
> Into the TextHighlighter class in gb.eval.highlight
>
> Then submit it for merge.
>
> I have attached the code to this email if anyone wants to review it.
> IThe code is basically an edit of the ToHtml() function.
>
> Would anyone object to having this function added?
> I have tested it with, LXTerminal, Mate terminal, UXTerminal, xTerm
> Konsole and gnome-terminal
> All work as expected.
>
> Thank You
> Brian G
>
>
> ----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]----
>
Please post a readable attachment if you want us to look at it.
Anyway, I can tell you that if your code is not terminal-agnostic, it
can't go as is inside TextHighlighter.
Regards,
--
Benoît Minisini
----[ [ http://gambaswiki.org/wiki/doc/netiquette | http://gambaswiki.org/wiki/doc/netiquette ] ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200707/6fefe63d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testtexthighlighter-0.0.1.tar.gz
Type: application/x-compressed-tar
Size: 13140 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200707/6fefe63d/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ToConsole.txt
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200707/6fefe63d/attachment-0001.txt>
More information about the User
mailing list