From b225fec1deb74fc1046e5a59cb8e63d9317ca2cd Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 15 Dec 2021 22:38:19 +0800 Subject: [PATCH] Fix indentations in class reference XMLs --- doc/classes/AnimationNode.xml | 2 +- doc/classes/HMACContext.xml | 80 +++++++++++++++++------------------ doc/classes/PhysicsServer.xml | 1 - 3 files changed, 41 insertions(+), 42 deletions(-) diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 27f13e465c3..ebb991de43d 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -5,7 +5,7 @@ Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. - Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. + Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index 203a3240f33..ae7c9742e24 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -5,49 +5,49 @@ The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once. - [codeblock] - extends Node - var ctx = HMACContext.new() + [codeblock] + extends Node + var ctx = HMACContext.new() - func _ready(): - var key = "supersecret".to_utf8() - var err = ctx.start(HashingContext.HASH_SHA256, key) - assert(err == OK) - var msg1 = "this is ".to_utf8() - var msg2 = "vewy vewy secret".to_utf8() - err = ctx.update(msg1) - assert(err == OK) - err = ctx.update(msg2) - assert(err == OK) - var hmac = ctx.finish() - print(hmac.hex_encode()) - [/codeblock] + func _ready(): + var key = "supersecret".to_utf8() + var err = ctx.start(HashingContext.HASH_SHA256, key) + assert(err == OK) + var msg1 = "this is ".to_utf8() + var msg2 = "vewy vewy secret".to_utf8() + err = ctx.update(msg1) + assert(err == OK) + err = ctx.update(msg2) + assert(err == OK) + var hmac = ctx.finish() + print(hmac.hex_encode()) + [/codeblock] And in C# we can use the following. - [codeblock] - using Godot; - using System; - using System.Diagnostics; + [codeblock] + using Godot; + using System; + using System.Diagnostics; - public class CryptoNode : Node - { - private HMACContext ctx = new HMACContext(); - public override void _Ready() - { - PoolByteArray key = String("supersecret").to_utf8(); - Error err = ctx.Start(HashingContext.HASH_SHA256, key); - GD.Assert(err == OK); - PoolByteArray msg1 = String("this is ").to_utf8(); - PoolByteArray msg2 = String("vewy vew secret").to_utf8(); - err = ctx.Update(msg1); - GD.Assert(err == OK); - err = ctx.Update(msg2); - GD.Assert(err == OK); - PoolByteArray hmac = ctx.Finish(); - GD.Print(hmac.HexEncode()); - } - } - [/codeblock] - [b]Note:[/b] Not available in HTML5 exports. + public class CryptoNode : Node + { + private HMACContext ctx = new HMACContext(); + public override void _Ready() + { + PoolByteArray key = String("supersecret").to_utf8(); + Error err = ctx.Start(HashingContext.HASH_SHA256, key); + GD.Assert(err == OK); + PoolByteArray msg1 = String("this is ").to_utf8(); + PoolByteArray msg2 = String("vewy vew secret").to_utf8(); + err = ctx.Update(msg1); + GD.Assert(err == OK); + err = ctx.Update(msg2); + GD.Assert(err == OK); + PoolByteArray hmac = ctx.Finish(); + GD.Print(hmac.HexEncode()); + } + } + [/codeblock] + [b]Note:[/b] Not available in HTML5 exports. diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index fc4cd2ea7f8..524f394a2f4 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -325,7 +325,6 @@ Returns the physics layer or layers a body can collide with. --