Unfortunately, because I don't have autocomplete, I have been struggling
with the correct/permissible use of the "match" or "matchAll" function.
I repeatedly made the following mistake :
let tableOfAnnouncementsHTML = announcementsHTML.match(/<table
var announcements = ;
href="([^"]+)">([^<]+)<\/a>)/g, function ()
announcements.push(Array.prototype.slice.call(arguments, 1, 4));
It is compatible with GJS and GNOME Shell to import modules from the npm
On the other hand, I don't want to use code that is just open and not
free (I recently read an article that deals with npm registry issue ).
But mostly I thought it can not be done, and I did not want to add
complexity with (unnecessary) dependencies.
Moreover, there is no implementation for regex in
"imports.gi.GLib.Regex" ? Can not I use this?
The site is written in HTML only, so I guess the Glib XML parser will
not work. Right?
Also, I don't find the documentation for XML parser in GJS, so I haven't
managed to find how to write it in my code.
I know this "rule", but what else can I do?
Finally, as a last resort, I managed to implement it with the poor
implementation of regular expressions.