aboutsummaryrefslogtreecommitdiff
path: root/parse_wiki_text
diff options
context:
space:
mode:
authorJJ2023-06-18 02:23:00 +0000
committerJJ2023-06-18 02:23:44 +0000
commiteee2567e8f9e2f8abf736c79ab12dd5242fab518 (patch)
tree2c3ddc77c32bf463c74c0bc331065fa1011caa9a /parse_wiki_text
parent1151e9d5c673dbdf61896094b86373c1a4edf4ab (diff)
minor wikitext display cleanups
Diffstat (limited to 'parse_wiki_text')
-rw-r--r--parse_wiki_text/src/display.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse_wiki_text/src/display.rs b/parse_wiki_text/src/display.rs
index 4c1f03a..011dd40 100644
--- a/parse_wiki_text/src/display.rs
+++ b/parse_wiki_text/src/display.rs
@@ -32,7 +32,7 @@ impl std::fmt::Display for Node<'_> {
match name.get(0) {
Some(name) =>
if let Node::Text { value, .. } = name {
- write!(f, "{}", handle_template(*value, parameters)?)
+ write!(f, "{}", expand_template(*value, parameters)?)
} else {
Err(Error)
},
@@ -91,7 +91,7 @@ impl std::fmt::Display for Node<'_> {
// https://en.wiktionary.org/wiki/Wiktionary:Templates
// wow, a function entirely composed of edge cases
-fn handle_template(name: &str, parameters: &Vec<Parameter>) -> Result<String, Error> {
+fn expand_template(name: &str, parameters: &Vec<Parameter>) -> Result<String, Error> {
let mut buffer = String::from("");
match name {
"m" => {