minor: format TOML examples as markdown code fences

pull/13253/head
Michael Davis 2025-04-06 13:51:13 -04:00
parent 424ffb4c2b
commit be1f4bdbe6
No known key found for this signature in database
1 changed files with 16 additions and 10 deletions

View File

@ -161,20 +161,26 @@ pub fn default_log_file() -> PathBuf {
/// all keys in `left`'s table unioned with all keys in `right` with the values
/// of `right` being merged recursively onto values of `left`.
///
/// crate::merge_toml_values(a, b, 3) combines, for example:
/// b:
/// \[\[language\]\]
/// name = "toml"
/// language-server = { command = "taplo", args = ["lsp", "stdio"] }
/// `crate::merge_toml_values(a, b, 3)` combines, for example:
///
/// b:
/// ```toml
/// [[language]]
/// name = "toml"
/// language-server = { command = "taplo", args = ["lsp", "stdio"] }
/// ```
/// a:
/// \[\[language\]\]
/// language-server = { command = "/usr/bin/taplo" }
/// ```toml
/// [[language]]
/// language-server = { command = "/usr/bin/taplo" }
/// ```
///
/// into:
/// \[\[language\]\]
/// name = "toml"
/// language-server = { command = "/usr/bin/taplo" }
/// ```toml
/// [[language]]
/// name = "toml"
/// language-server = { command = "/usr/bin/taplo" }
/// ```
///
/// thus it overrides the third depth-level of b with values of a if they exist,
/// but otherwise merges their values