588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
**
** For example, "body.forum div.markdown blockquote" targets only
** block quotes made in forum posts, leaving other Markdown quotes
** alone. Because feature class "forum" groups /forummain, /forumpost,
** and /forume2, it works across all renderings of Markdown to HTML
** within the Fossil forum feature.
*/
static const char* feature_from_page_path(const char *zPath)
{
const char* zSlash = strchr(zPath, '/');
if (zSlash) {
return fossil_strndup(zPath, zSlash - zPath);
} else {
return zPath;
}
}
/*
** Override the value of the TH1 variable current_feature, its default
** set by feature_from_page_path(). We do not call this from
** style_init_th1_vars() because that uses Th_MaybeStore() instead to
** allow webpage implementations to call this before style_header()
** to override that "maybe" default with something better.
*/
void style_set_current_feature(const char* zFeature)
{
Th_Store("current_feature", zFeature);
}
/*
** Initialize all the default TH1 variables
*/
static void style_init_th1_vars(const char *zTitle){
|
|
<
|
<
|
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
|
**
** For example, "body.forum div.markdown blockquote" targets only
** block quotes made in forum posts, leaving other Markdown quotes
** alone. Because feature class "forum" groups /forummain, /forumpost,
** and /forume2, it works across all renderings of Markdown to HTML
** within the Fossil forum feature.
*/
static const char* feature_from_page_path(const char *zPath){
const char* zSlash = strchr(zPath, '/');
if (zSlash) {
return fossil_strndup(zPath, zSlash - zPath);
} else {
return zPath;
}
}
/*
** Override the value of the TH1 variable current_feature, its default
** set by feature_from_page_path(). We do not call this from
** style_init_th1_vars() because that uses Th_MaybeStore() instead to
** allow webpage implementations to call this before style_header()
** to override that "maybe" default with something better.
*/
void style_set_current_feature(const char* zFeature){
Th_Store("current_feature", zFeature);
}
/*
** Initialize all the default TH1 variables
*/
static void style_init_th1_vars(const char *zTitle){
|