Add org-link-parameters to the GlobalSettings.
This commit is contained in:
parent
7cf1f7b7bb
commit
f220fd63e5
@ -37,6 +37,11 @@ pub struct GlobalSettings<'g, 's> {
|
||||
///
|
||||
/// Corresponds to org-coderef-label-format elisp variable.
|
||||
pub coderef_label_format: &'g str,
|
||||
|
||||
/// The allowed protocols for links (for example, the "https" in "https://foo.bar/").
|
||||
///
|
||||
/// COrresponds to org-link-parameters elisp variable.
|
||||
pub org_link_parameters: &'g [&'g str],
|
||||
}
|
||||
|
||||
pub const DEFAULT_TAB_WIDTH: IndentationLevel = 8;
|
||||
@ -55,6 +60,7 @@ impl<'g, 's> GlobalSettings<'g, 's> {
|
||||
odd_levels_only: HeadlineLevelFilter::default(),
|
||||
footnote_section: "Footnotes",
|
||||
coderef_label_format: "(ref:%s)",
|
||||
org_link_parameters: &ORG_LINK_PARAMETERS,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -76,3 +82,29 @@ impl Default for HeadlineLevelFilter {
|
||||
HeadlineLevelFilter::OddEven
|
||||
}
|
||||
}
|
||||
|
||||
const ORG_LINK_PARAMETERS: [&'static str; 23] = [
|
||||
"id",
|
||||
"eww",
|
||||
"rmail",
|
||||
"mhe",
|
||||
"irc",
|
||||
"info",
|
||||
"gnus",
|
||||
"docview",
|
||||
"bibtex",
|
||||
"bbdb",
|
||||
"w3m",
|
||||
"doi",
|
||||
"file+sys",
|
||||
"file+emacs",
|
||||
"shell",
|
||||
"news",
|
||||
"mailto",
|
||||
"https",
|
||||
"http",
|
||||
"ftp",
|
||||
"help",
|
||||
"file",
|
||||
"elisp",
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user