mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-12-01 00:45:41 +00:00
Allow to give the css file for the highlighter in tawashi.ini
This commit is contained in:
parent
7ada0f155b
commit
2571e70093
3 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@ redis_port = 6379
|
||||||
redis_mode = inet
|
redis_mode = inet
|
||||||
host_name = 127.0.0.1
|
host_name = 127.0.0.1
|
||||||
host_port = from_downstream
|
host_port = from_downstream
|
||||||
|
highlight_css = sh_greenlcd.css
|
||||||
website_root = @CMAKE_CURRENT_BINARY_DIR@/html
|
website_root = @CMAKE_CURRENT_BINARY_DIR@/html
|
||||||
logging_level = trace
|
logging_level = trace
|
||||||
log_file = @CMAKE_CURRENT_BINARY_DIR@/tawashi.log
|
log_file = @CMAKE_CURRENT_BINARY_DIR@/tawashi.log
|
||||||
|
|
|
@ -81,6 +81,7 @@ namespace {
|
||||||
parSettings.add_default("logging_level", "err");
|
parSettings.add_default("logging_level", "err");
|
||||||
parSettings.add_default("resubmit_wait", "10");
|
parSettings.add_default("resubmit_wait", "10");
|
||||||
parSettings.add_default("log_file", "-");
|
parSettings.add_default("log_file", "-");
|
||||||
|
parSettings.add_default("highlight_css", "sh_darkness.css");
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_buildtime_info() {
|
void print_buildtime_info() {
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
namespace tawashi {
|
namespace tawashi {
|
||||||
namespace {
|
namespace {
|
||||||
const char g_nolang_token[] = "colourless";
|
const char g_nolang_token[] = "colourless";
|
||||||
|
|
||||||
|
std::string highlight_css_path (const SettingsBag& parSettings) {
|
||||||
|
//TODO: make sure the file exists or throw or do something
|
||||||
|
return parSettings.as<std::string>("highlight_css");
|
||||||
|
}
|
||||||
} //unnamed namespace
|
} //unnamed namespace
|
||||||
|
|
||||||
PastieResponse::PastieResponse (
|
PastieResponse::PastieResponse (
|
||||||
|
@ -84,7 +89,7 @@ namespace tawashi {
|
||||||
#endif
|
#endif
|
||||||
highlighter.setCanUseStdOut(false);
|
highlighter.setCanUseStdOut(false);
|
||||||
highlighter.setTabSpaces(4);
|
highlighter.setTabSpaces(4);
|
||||||
highlighter.setStyleCssFile("sh_darkness.css");
|
highlighter.setStyleCssFile(highlight_css_path(settings()));
|
||||||
highlighter.setGenerateLineNumbers(false);
|
highlighter.setGenerateLineNumbers(false);
|
||||||
|
|
||||||
std::string processed_pastie;
|
std::string processed_pastie;
|
||||||
|
|
Loading…
Reference in a new issue