Fix AsciiDoc not rendering in tables

This commit is contained in:
Lars Mueller 2022-09-01 13:20:25 +02:00
parent 1b7c796920
commit b47713e48a
3 changed files with 26 additions and 18 deletions

@ -108,9 +108,9 @@ Allows overriding the tool capabilities specified in the item definition.
[%autowidth, frame=none]
|===
| `tool_capabilities` | `nil` or a tool capabilities table | Either:
* `nil`: Clears the tool capability override, or
* Tool capabilities table: Overrides the defined tool capabilities (see ItemDefinition for the table format)
| `tool_capabilities` | `nil` or a tool capabilities table a| Either:
* `nil`: Clears the tool capability override, or
* Tool capabilities table: Overrides the defined tool capabilities (see ItemDefinition for the table format)
|===
NOTE: The corresponding `:get_tool_capabilities` is not a method of ItemStackMetaData but rather of the "parent" ItemStack.

@ -73,7 +73,7 @@ Checks for the existence of a key-value pair.
===== Returns
[%autowidth, frame=none]
|===
| `has` | `nil`, `true` or `false` |One of:
| `has` | `nil`, `true` or `false` a| One of:
* `nil`: Invalid `self`
* `false`: No key-value pair with the given key exists.
@ -87,7 +87,8 @@ Retrieves the value associated with a key.
===== Returns
[%autowidth, frame=none]
|===
| `value` | `nil` or `{type-string}` | Either:
| `value` | `nil` or `{type-string}` a| Either:
* `nil` if no matching key-value pair exists, or
* `{type-string}`: The associated value
|===
@ -99,7 +100,8 @@ Retrieves the value associated with a key & coerces to string.
===== Returns
[%autowidth, frame=none]
|===
| `value` | `{type-string}` | Either:
| `value` | `{type-string}` a| Either:
* `""` if no matching key-value pair exists, or
* `{type-string}`: The associated value
|===
@ -111,7 +113,8 @@ Retrieves the value associated with a key & coerces it to an integer.
===== Returns
[%autowidth, frame=none]
|===
| `value` | `{type-number}` | Either:
| `value` | `{type-number}` a| Either:
* `0` if no matching key-value pair exists, or
* `{type-number}`: The associated value, coerced to an integer
|===
@ -123,7 +126,8 @@ Retrieves the value associated with a key & coerces it to a floating-point numbe
===== Returns
[%autowidth, frame=none]
|===
| `value` | `{type-number}` | Either:
| `value` | `{type-number}` a| Either:
* `0` if no matching key-value pair exists, or
* `{type-number}`: The associated value, coerced to a floating point number
|===
@ -146,7 +150,8 @@ Setters have no return values; they all take exactly two arguments: Key & value.
==== Arguments
[%autowidth, frame=none]
|===
| `value` | `{type-string}` | The value to associate with `key`. Either:
| `value` | `{type-string}` a| The value to associate with `key`. Either:
* `""` to remove the key-value pair, or
* any other string to update/insert a key-value pair
|===
@ -156,7 +161,7 @@ Setters have no return values; they all take exactly two arguments: Key & value.
==== Arguments
[%autowidth, frame=none]
|===
| `value` | `{type-number}` | The integer value to coerce to a string & associate with `key`
| `value` | `{type-number}` a| The integer value to coerce to a string & associate with `key`
WARNING: Integer refers to a C(++) `int` as internally used by the implementation - usually 32 bits wide -
meaning it is unable to represent as large integer numbers as the Lua number type.
@ -169,7 +174,7 @@ Keep `value` between `-2^31` and `2^31 - 1`, both inclusive.
==== Arguments
[%autowidth, frame=none]
|===
| `value` | `{type-number}` | The floating-point value to coerce to a string & associate with `key`
| `value` | `{type-number}` a| The floating-point value to coerce to a string & associate with `key`
WARNING: The implementation internally uses the C(++) `float` type - usually 32 bits wide -
whereas Lua guarantees 64-bit "double-precision" floating point numbers.
@ -197,7 +202,8 @@ Converts the metadata to a Lua table representation.
===== Returns
[%autowidth, frame=none]
|===
| `value` | `nil` or `{type-table}` | Either:
| `value` | `nil` or `{type-table}` a| Either:
* `nil` if the metadata is invalid (?), or
* `{type-table}`: A table representation of the metadata with the following fields:
** `fields`: Table `{[key] = value, ...}`
@ -213,9 +219,10 @@ Sets the key-value pairs to match those of a given table representation or clear
===== Arguments
[%autowidth, frame=none]
|===
| `table` | `{type-table}` or any other type | Either:
* The table representation as produced by `:to_table()`, or
* Any non-table value: Clears the metadata
| `table` | `{type-table}` or any other type a| Either:
* The table representation as produced by `:to_table()`, or
* Any non-table value: Clears the metadata
|===
===== Returns

@ -117,9 +117,10 @@ NOTE: `to_table` and `from_table` do not keep track of which fields were marked
[%autowidth, frame=none]
|===
| `keys` | `{type-string}` or list of `{type-string}` | Either:
* A single key to mark as private, or
* A list of keys to mark as private
| `keys` | `{type-string}` or list of `{type-string}` a| Either:
* A single key to mark as private, or
* A list of keys to mark as private
|===
=== `:get_inventory()`