Skip to content

Bulleted/numbered lines and indentations #70

@matus-z-ceros

Description

@matus-z-ceros

Add support for bulleted/numbered lines (a.k.a. unordered/ordered lists) and tab indentations.
The spec should enable line indentations without the bullet/number - e.g. the first line of a paragraph which is indented by a single tab.

These are related to the Text structure and should be nested under it.

Proposal 1 - A map from line numbers to line styles

"text": {
    ...,
    "lines": {
        "0": {
            "indentation": 1
        },
        "2": {
            "type": "ORDERED",
            "indentation": 1
        },
        "3": {
            "type": "ORDERED",
            "indentation": 1
        },
        "4": {
            "type": "ORDERED",
            "indentation": 1
        }
    }
} 
  • The approach saves data by skipping default values which are { "type": "NORMAL", "indentation": 0 }.

Proposal 2 - An array of ranged line styles

"text": {
    ...,
    "lines": [
        {
            "line": {
                "type": "NONE",
                "indentation": 1
            },
            "ranges": {
                {
                    "from": 0,
                    "to": 1
                }
            }
        },
        {
            "line": {
                "type": "ORDERED",
                "indentation": 1
            },
            "ranges": {
                {
                    "from": 2,
                    "to": 5
                }
            }
        }
    ]
}
  • This approach uses a Range sub-structure similarly to the StyleRange structure.

Metadata

Metadata

Assignees

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