Skip to content

Range rewrite #47

@Enter-tainer

Description

@Enter-tainer

Add an optional arg to current interface to perform certain action on source code ranges.

fn pretty_print(content: &str, width: usize, actions: Vec<(start, end, RewriteAction)>)

, where action is an enum defined in typstyle. It can be ToMultiline, ToSingleLine, ToBlockEquation, ToInlineEquation, NoFormat...

typstyle will find the first ast node(in order traversal) which is contained by the provided range.

When certain action is not applicable, it will be sliently ignored

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