Fossil SCM

Put the search snippets inside of <span class='snippet'>.

drh 2015-02-03 04:45 UTC indexed-fts
Commit 1b08cfe2155004724ffa86c10e4dc69655364732
2 files changed +2 -1 +1 -1
+2 -1
--- src/search.c
+++ src/search.c
@@ -813,11 +813,12 @@
813813
const char *zLabel = db_column_text(&q, 2);
814814
if( nRow==0 ){
815815
@ <ol>
816816
}
817817
nRow++;
818
- @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>%s(zSnippet)</li>
818
+ @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>
819
+ @ <span class='snippet'>%s(zSnippet)</span></li>
819820
}
820821
db_finalize(&q);
821822
if( nRow ){
822823
@ </ol>
823824
}
824825
--- src/search.c
+++ src/search.c
@@ -813,11 +813,12 @@
813 const char *zLabel = db_column_text(&q, 2);
814 if( nRow==0 ){
815 @ <ol>
816 }
817 nRow++;
818 @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>%s(zSnippet)</li>
 
819 }
820 db_finalize(&q);
821 if( nRow ){
822 @ </ol>
823 }
824
--- src/search.c
+++ src/search.c
@@ -813,11 +813,12 @@
813 const char *zLabel = db_column_text(&q, 2);
814 if( nRow==0 ){
815 @ <ol>
816 }
817 nRow++;
818 @ <li><p><a href='%s(zUrl)'>%h(zLabel)</a><br>
819 @ <span class='snippet'>%s(zSnippet)</span></li>
820 }
821 db_finalize(&q);
822 if( nRow ){
823 @ </ol>
824 }
825
+1 -1
--- src/style.c
+++ src/style.c
@@ -1125,11 +1125,11 @@
11251125
},
11261126
{ "th.sort.desc:after",
11271127
"Descending sort column marker",
11281128
@ content: '\2191';
11291129
},
1130
- { "mark",
1130
+ { "span.snippet>mark",
11311131
"Search markup",
11321132
@ background-color: inherit;
11331133
@ font-weight: bold;
11341134
},
11351135
{ 0,
11361136
--- src/style.c
+++ src/style.c
@@ -1125,11 +1125,11 @@
1125 },
1126 { "th.sort.desc:after",
1127 "Descending sort column marker",
1128 @ content: '\2191';
1129 },
1130 { "mark",
1131 "Search markup",
1132 @ background-color: inherit;
1133 @ font-weight: bold;
1134 },
1135 { 0,
1136
--- src/style.c
+++ src/style.c
@@ -1125,11 +1125,11 @@
1125 },
1126 { "th.sort.desc:after",
1127 "Descending sort column marker",
1128 @ content: '\2191';
1129 },
1130 { "span.snippet>mark",
1131 "Search markup",
1132 @ background-color: inherit;
1133 @ font-weight: bold;
1134 },
1135 { 0,
1136

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button