From bdd3dfba1518567475630140135b4ae69c3820f0 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Fri, 10 Sep 2021 14:55:02 +0200 Subject: [PATCH] docs: Format @variable properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When documenting our public API in some places we use '@' to refer to the variable. For instance: * This API tries to set guest time to the given value. The time * to set (@seconds and @nseconds) should be in seconds relative * to the Epoch of 1970-01-01 00:00:00 in UTC. However, when generating HTML documentation these tokens are copied verbatim. What we can do is drop the '@' character and wrap the variable in so that it is formatted properly. Due to the way we 'parse' docs a token might actually be slightly more than just '@variable'. For instance in the example above we will have the following tokens: '(@seconds' and '@nseconds)'. Thus we need to handle possible substring before and after variable. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- docs/newapi.xsl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/newapi.xsl b/docs/newapi.xsl index 7ac8caa35d..e56a5f2a27 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -139,6 +139,12 @@ + + + + + +