Fossil

Check-in [1b08cfe215]
Login

Check-in [1b08cfe215]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Put the search snippets inside of <span class='snippet'>.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | indexed-fts
Files: files | file ages | folders
SHA1: 1b08cfe2155004724ffa86c10e4dc69655364732
User & Date: drh 2015-02-03 04:45:46.345
Context
2015-02-03
04:58
Add a control to the /srchsetup page that allows the full-text index to be created and destroyed. ... (Closed-Leaf check-in: ef78fba86a user: drh tags: indexed-fts)
04:45
Put the search snippets inside of <span class='snippet'>. ... (check-in: 1b08cfe215 user: drh tags: indexed-fts)
04:39
Highlight matching works on a search using <mark> rather than <b> and add appropriate CSS to make "mark" look like "b" by default. ... (check-in: c5a2832eeb user: drh tags: indexed-fts)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/search.c.
811
812
813
814
815
816
817
818

819
820
821
822
823
824
825
    const char *zUrl = db_column_text(&q, 0);
    const char *zSnippet = db_column_text(&q, 1);
    const char *zLabel = db_column_text(&q, 2);
    if( nRow==0 ){
      @ <ol>
    }
    nRow++;
    @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>%s(zSnippet)</li>

  }
  db_finalize(&q);
  if( nRow ){
    @ </ol>
  }
  return nRow;
}







|
>







811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
    const char *zUrl = db_column_text(&q, 0);
    const char *zSnippet = db_column_text(&q, 1);
    const char *zLabel = db_column_text(&q, 2);
    if( nRow==0 ){
      @ <ol>
    }
    nRow++;
    @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>
    @ <span class='snippet'>%s(zSnippet)</span></li>
  }
  db_finalize(&q);
  if( nRow ){
    @ </ol>
  }
  return nRow;
}
Changes to src/style.c.
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
    "Ascending sort column marker",
    @ content: '\2193';
  },
  { "th.sort.desc:after",
    "Descending sort column marker",
    @ content: '\2191';
  },
  { "mark",
    "Search markup",
    @ background-color: inherit;
    @ font-weight: bold;
  },
  { 0,
    0,
    0







|







1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
    "Ascending sort column marker",
    @ content: '\2193';
  },
  { "th.sort.desc:after",
    "Descending sort column marker",
    @ content: '\2191';
  },
  { "span.snippet>mark",
    "Search markup",
    @ background-color: inherit;
    @ font-weight: bold;
  },
  { 0,
    0,
    0