Source: site.view [edit]
Function name: testCategories
Arguments:
Description:
Page type: html
Render function:  
Module: perfectCartoon

Page source:

<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Cartoon Search | Admin Console</title>
    <link rel="stylesheet" href="http://www.perfectcartoon.com/css/basic.css" type="text/css" />
    <webl>WubCall("perfectCartoon.css", []);</webl>
  </head>
  <body>
    <div id="page">
      <div id="container">
        <h1><a href="/doit/adminConsole">Cartoon Search</a></h1>
        <h2>Test Categories</h2>
        
        <webl>
          var settings = WubCall("cartoonDBSettings", []);
          var html = "";
          html = html + `Inspect these categories and make sure there are no duplicates or typos.  Suspicious categories are highlighted in <font color='red'>RED</font>.  Fix any mistakes by editing the <a target="_blank" href="https://docs.google.com/spreadsheet/ccc?key=0AsUaQihpzloZdEJXbkc0Y2pSS1VRX180aEVlaEdwTkE#gid=0">source data file</a> and <a href="http://wubhub.com:4110/webl/WubHub_DoIt?cmdline=buildSearchEngine">rebuilding the index</a> (takes 5 minutes).  Then rerun this test.` + "\n";
          html = html + "<ul>\n";
          var last = "";
          every tag in Wub_Sort(ToList(settings.tagSet)) do
             if (Str_Trim(tag) != "") then
                var style = "";
                if ((last != "") and (WubCall("levenshteinDistance", [last, tag]) < 3)) or (tag[0] > 'Z') then
                   style = ` style="color:red"`;
                end;
                html = html + "<li " + style + ">" + tag + "</li>\n";
                last = tag;
             end
          end;
          html = html + "</ul>\n";
          html;
        </webl>
        
      </div>
    </div>
  </body>
</html>