Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add blank lines after semicolons #31

Closed
wants to merge 2 commits into from
Closed

[WIP] Add blank lines after semicolons #31

wants to merge 2 commits into from

Commits on Aug 16, 2021

  1. Include vertical whitespace in formatter output

    Vertical spacing makes the code more legible. This version adds a single
    blank line after almost every semicolon.
    
    There are two exceptions:
    - If there`s a `within` on a given line, a blank line won't be added.
    - If inside matrix (i.e. `[]`), a blank line won't be added.
    
      Example output:
    
        parameter Integer[2,2] A = [
          1,2;
          3,4];
    
    Also:
    - Add example with formatting arrays and matrices
    
    Known issues:
    - The formatted file will have two blank lines at the end. The solution
      would be to detect if we're on line with the last `end` within the
      file, and then skip adding an additional blank line. There might be
      multiple `end` in a file, so this is not that obvious to solve.
    tpwo committed Aug 16, 2021
    Configuration menu
    Copy the full SHA
    ec9d3bf View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. Make -out files as desired so tests currently fail

    We need to find a way to get rid of duplicated blank line at the end of
    files that have semicolon in the last line.
    tpwo committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    5afef81 View commit details
    Browse the repository at this point in the history