[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Re: URL recognition

In message <570705d39bLists@xxxxxxxxxxx>
          "Richard Torrens (lists)" <Lists@xxxxxxxxxxx> wrote:

> In article <c462010757.fjgraute@xxxxxxxxx>,
>    Fred Graute <fjgraute@xxxxxxxxx> wrote:
> > There are two parts to this. The SyntaxWords group causes URLs to be
> > highlighted. The ClickList Select2 makes URLs clickable.
> > Both require that the URL starts with the name of a scheme as shown in
> > the SyntaxWords group above. Things like 'stronged.torrens.org' can be
> > coloured by adding the entire string to a SyntaxWords group but they
> > can't be launched due to the lack of a scheme.
> OK, so it is not possible to make launchable anything based on .org etc...

Yes, you can but it takes a bit of work and you need to be careful to
avoid false positives. The ClickList part is easy, say:

  Clicklist Select2
     dotorg   BroadcastURL("<StrongED$Tmp_MarkWord>")

The difficulty is in getting the search expression right. As a quick
test I used a rather simplistic one:

    dotorg    {~"org" (\a | ".")}+ "org"

For real use this needs to be expanded upon. It may also be useful to
add a scheme to the string passed to BraodcastURL. For example:


Colouring such strings is practically impossible because the syntax
colouring system works by having an explicit match at the start of a
string, not the end.


StrongED Developer

To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at