config-perso/machines/kat-son/doc/0001-fix-pretty-no-defaults.patch

25 lines
1.4 KiB
Diff

From f050ca4374c8c4d9d4fa85e46a1dedaaaedec791 Mon Sep 17 00:00:00 2001
From: catvayor <catvayor@katvayor.net>
Date: Wed, 11 Dec 2024 15:34:42 +0100
Subject: [PATCH] fix: pretty no defaults
---
static/js/script.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/static/js/script.js b/static/js/script.js
index 56b633b..04234d7 100644
--- a/static/js/script.js
+++ b/static/js/script.js
@@ -293,7 +293,7 @@ var expandOption = function(el){
var elDesc = "<h5 style='margin:1em 0 0 0'>Description</h5><div>" + parseDescription(currentSet[el].description) + "</div>";
var elType = "<h5 style='margin:1em 0 0 0'>Type</h5><div>" + currentSet[el].type + "</div>";
//var elNote = ( currentSet[el].note == "" ? "": "<h5 style='margin:1em 0 0 0'>Note</h5><div>" + currentSet[el].note + "</div>");
- var elDefault = "<h5 style='margin:1em 0 0 0'>Default</h5><div><pre style='margin-top:0.5em'>" + currentSet[el].default + "</pre></div>";
+ var elDefault = ( currentSet[el].default == "" ? "" : "<h5 style='margin:1em 0 0 0'>Default</h5><div><pre style='margin-top:0.5em'>" + currentSet[el].default + "</pre></div>");
var elExample = ( currentSet[el].example == "" ? "" : "<h5 style='margin:1em 0 0 0'>Example</h5><div><pre style='margin-top:0.5em'>" + currentSet[el].example + "</pre></div>");
//var declared_by_str = currentSet[el].declarations[0].name;
--
2.47.0