Properly escape Markdown markups at minetest.string_to_area (#14774)

Co-authored-by: DS <ds.desour@proton.me>
This commit is contained in:
1F616EMO~nya 2024-06-25 04:14:16 +08:00 committed by GitHub
parent 50da26da91
commit fb6ceb2664
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -4007,8 +4007,9 @@ Helper functions
* X1, Y1, ... Z2 are coordinates * X1, Y1, ... Z2 are coordinates
* `relative_to`: Optional. If set to a position, each coordinate * `relative_to`: Optional. If set to a position, each coordinate
can use the tilde notation for relative positions can use the tilde notation for relative positions
* Tilde notation: "~": Relative coordinate * Tilde notation
"~<number>": Relative coordinate plus <number> * `"~"`: Relative coordinate
* `"~<number>"`: Relative coordinate plus `<number>`
* Example: `minetest.string_to_area("(1,2,3) (~5,~-5,~)", {x=10,y=10,z=10})` * Example: `minetest.string_to_area("(1,2,3) (~5,~-5,~)", {x=10,y=10,z=10})`
returns `{x=1,y=2,z=3}, {x=15,y=5,z=10}` returns `{x=1,y=2,z=3}, {x=15,y=5,z=10}`
* `minetest.formspec_escape(string)`: returns a string * `minetest.formspec_escape(string)`: returns a string