From 185966f036b15b37ae35627d34a4d364842d5584 Mon Sep 17 00:00:00 2001 From: peteyboy Date: Tue, 9 Jun 2026 23:03:54 +0000 Subject: [PATCH] Reverted the cutesiness with the link lines. Can't figure out why I can't have => *link* [>count] *link desc* without if there is no *link desc* that the [] link number ends up on the next line. Reverting for now. --- script/connex.pl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/script/connex.pl b/script/connex.pl index 1bfc1d2..7c4d123 100755 --- a/script/connex.pl +++ b/script/connex.pl @@ -471,16 +471,13 @@ sub is_path_index{ sub add_page_link{ my $linkline = shift; my $base_url = shift; - #my $link=~ /^=>[ ]+([^ ]*)/ - my $link = $linkline; my $uri_object; - $link=~ s/^=> ([^ ]*)/$1/; #remember inside of braces, ^ means NOT, so any NOT SPACE letters are selected, so everything up to next space - #my $link=~ s/^=>[ ]*(.*$)/$1/r; local $URI::ABS_ALLOW_RELATIVE_SCHEME = 1; local $URI::ABS_REMOTE_LEADING_DOTS = 1; - if (defined($link)){ #has to be something here or I think URI->new_abs has exception that crashes app - $uri_object=URI->new_abs($link,$base_url); + #remember inside of braces, ^ means NOT, so any NOT SPACE letters are selected, so everything up to next space + if (defined($linkline=~ /^=> ([^ ]*)/)){ #has to be something here or I think URI->new_abs has exception that crashes app + $uri_object=URI->new_abs($linkline=~ /^=> ([^ ]*)/,$base_url); push(@page_links, $uri_object->as_string); my $count = scalar @page_links; #scalar is size/count of links, but $#page_links is highest INDEX #return $linkline =~ s/(^=>.*$)/$1 [\>$count\]/r; don't need to escape on the replace part of a substitution, I guess? -- 2.39.5