texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Sun, 20 Mar 2022 04:55:18 -0400 (EDT)

branch: master
commit 7752049bd87cdf4fa1466f713f146f3f9b44d015
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Oct 16 14:12:41 2019 +0100

    check rel attribute to find index nodes
---
 js/wkinfo/extension.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/js/wkinfo/extension.c b/js/wkinfo/extension.c
index 1d5539f3c5..3301aea485 100644
--- a/js/wkinfo/extension.c
+++ b/js/wkinfo/extension.c
@@ -190,15 +190,11 @@ find_indices (WebKitDOMHTMLCollection *links, gulong 
num_links)
       char *rel = webkit_dom_element_get_attribute (element, "rel");
       char *id = webkit_dom_element_get_attribute (element, "id");
 
-      /* Look for links to index nodes in the main menu.
-         This is not the best way to check for index nodes.  We should
-         have <a rel="index"> on the links instead. */
-      if (href && (!rel || !*rel) && (!id || !*id)
-          && (strstr (href, "-Index.html")
-              || strstr (href, "-index.html")
-              || strstr (href, "/Index.html")))
+      /* Look for links to index nodes in the main menu by checking the "rel" 
+         attribute. */
+      if (href && (!id || !*id) && rel && !strcmp(rel, "index"))
         {
-          g_print ("AAAAAAA AAAAAAA index node at |%s|\n", href);
+          g_print ("index node at |%s|\n", href);
           g_string_append (s, href);
           g_string_append (s, "\n");
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]