Skip to content

feature: support multiline phrases #58

@serpro69

Description

@serpro69

Is it possible to add support for multi-line phrases?
E.g. let's say you want to practice typing in a programming context, then you could add a phrase like:

    opts = {
      phrases = {
        [[
        def main:
          print("Hello, World!")
        ]],
      },
    },

However, in typr this will not render properly and will look something like this:

  ┌─────────────────────────────────────────────────────────────────────────┐   
  │   Symbols    Numbers    Random    Phrases          Lines  3 * 6 * 9 │   
  └─────────────────────────────────────────────────────────────────────────┘   
                                                                                
  def main: print("Hello, World!") def main:                                    
  print("Hello, World!") def main: print("Hello,                                
                                                                                
                                                                                
                                                                                
   ESC  or  q  - Quit    i  - Start                     CTRL   R  - Restart     
────────────────────────────────────────────────────────────────────────────────

So line breaks and indentation is not preserved.

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