From 32894e744cf0177954315df6910369e1e9b468a8 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Mon, 28 Oct 2024 05:35:42 +0100 Subject: [PATCH] make two functions more readable --- core/wiki/macros/sidebar-resizer.tid | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 25bfd4204..d8e299e79 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -13,9 +13,29 @@ title: $:/core/procedures/sidebar-resizer \function convert.to.pixels.locally(value) [is.percentage.valuemultiplydivide[100]] :else[convert.to.pixels] -\function convert.to.result(value,suffix) [match[px]then] [match[%]then] [match[cm]then] [match[mm]then] [match[Q]then] [match[in]then] [match[pc]then] [match[pt]then] [match[em]then] +\function convert.to.result(value,suffix) +[match[px]then] +:else[match[%]then] +:else[match[cm]then] +:else[match[mm]then] +:else[match[Q]then] +:else[match[in]then] +:else[match[pc]then] +:else[match[pt]then] +:else[match[em]then] +\end -\function get.value.metric(value) [suffix[px]then[px]] :else[suffix[%]then[%]] :else[suffix[cm]then[cm]] :else[suffix[mm]then[mm]] :else[suffix[Q]then[Q]] :else[suffix[in]then[in]] :else[suffix[pc]then[pc]] :else[suffix[pt]then[pt]] :else[suffix[em]then[em]] +\function get.value.metric(value) +[suffix[px]then[px]] +:else[suffix[%]then[%]] +:else[suffix[cm]then[cm]] +:else[suffix[mm]then[mm]] +:else[suffix[Q]then[Q]] +:else[suffix[in]then[in]] +:else[suffix[pc]then[pc]] +:else[suffix[pt]then[pt]] +:else[suffix[em]then[em]] +\end \procedure set_theme_throttling(metric) <$set name="metricsTiddler" value={{{ [function[get.theme],] }}}>