Skip to content

Undesired space for documentation #4

@ghivert

Description

@ghivert

Hi!

In the documentation fields, there's an undesired leading space for every line.

Here's an example, from the package interface of the gleam_stdlib right now (append function here):

{
  // That field has undesired spaces
  "documentation": " Creates a new bit array by joining two bit arrays.\n\n ## Examples\n\n ```gleam\n append(to: from_string(\"butter\"), suffix: from_string(\"fly\"))\n // -> from_string(\"butterfly\")\n ```\n",

  // Rest of the definition.
  "deprecation": null,
  "implementations": {
    "gleam": false,
    "uses-erlang-externals": true,
    "uses-javascript-externals": true,
    "can-run-on-erlang": true,
    "can-run-on-javascript": true
  },
  "parameters": [
    {
      "label": "to",
      "type": {
        "kind": "named",
        "name": "BitArray",
        "package": "",
        "module": "gleam",
        "parameters": [
          
        ]
      }
    },
    {
      "label": "suffix",
      "type": {
        "kind": "named",
        "name": "BitArray",
        "package": "",
        "module": "gleam",
        "parameters": [
          
        ]
      }
    }
  ],
  "return": {
    "kind": "named",
    "name": "BitArray",
    "package": "",
    "module": "gleam",
    "parameters": [
      
    ]
  }
}

I suspect it's due to the /// comments removed, but the space between the triple slash and the comments themselves are still there. It's a bug, because the string as-is is not a valid markdown string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions