Skip to content

Too much indentation inside odoc code blocks inside docstring #340

@panglesd

Description

@panglesd

Hello! (And thanks for maintaining this tool!)

Odoc has changed the way it considers indentation in code blocks in ocaml/odoc#1317.

Basically, odoc only "extracts" what's inside this ascii art box::

     {[
     +--------------------------
     |
     |    Content
     |
     +--------------------------
     ]}

In other words, it removes as much indentation as the opening { is indented.

However, by default ocp-indent adds two indentation compared to the opening {: If | is the cursor, hitting tab on:

     {[
|
     ]}

indents to:

     {[
       |
     ]}

instead of

     {[
     |
     ]}

I hope my explanation is not too confusing! And thanks @mbarbin for reporting.

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