pml-lang / pml-companion

Java source code of the 'PML Companion (PMLC)'
https://www.pml-lang.dev
GNU General Public License v2.0
22 stars 1 forks source link

Problems with [text Node #76

Closed tajmone closed 2 years ago

tajmone commented 2 years ago

The generated pml_tags.json file of PML 2.3.0 contains a reference to the [text tag which has no corresponding entry in the PML Reference Manual:

            {
                "id":"text",
                "type":"inline",
                "title":"Text",
                "description":null,
                "examples":"It's a good day.",
                "attributes":null,
                "default_attribute_id":null,
                "HTML_attributes_allowed":false,
                "is_inline_type":true,
                "is_raw_text_block":false,
                "child_nodes_allowed":false,
                "opening_tag":"[text",
                "closing_tag":"]",
                "latest_doc_url":"https://www.pml-lang.dev/docs/reference_manual/index.html#node_text"
            },

Its docs links point to a non-existing anchor:

https://www.pml-lang.dev/docs/reference_manual/index.html#node_text

Which one is wrong, the JSON file or the Ref.Man? i.e. does this [text node really exist, or is it just undocumented?

pml-lang commented 2 years ago

does this [text node really exist

Yes. It is an internal node used to store inline text in the AST.

For example, this PML code:

[p [i foo1] foo2]

is internally converted into a p block node containing two inline nodes (i and text), like this:

[p [i foo1][text  foo2]]

is it just undocumented?

Yes. It is currently undocumented. But it should actually be documented, as it can be useful in some situations, such as machine-generated PML code.

Which one is wrong, the JSON file or the Ref.Man?

The JSON file is correct.

pml-lang commented 2 years ago

Fixed in version 3.0.0.