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

Allow switch statements in TemplateMark #707

Open
OliverTod opened this issue Nov 24, 2021 · 3 comments
Open

Allow switch statements in TemplateMark #707

OliverTod opened this issue Nov 24, 2021 · 3 comments

Comments

@OliverTod
Copy link

This issue extends #588.

Requested functionality:
Extend TemplateMark so that more complex conditional statements can be used in a bidirectional way. That is, so that users can draft and parse with greater flexibility. This could be done by allowing switch statements.

Switch statements
For example, in JavaScript a switch statement is written as:

switch(colourVariable){
  case "yellow":
  ...
  break

  case "red":
  ...
  break

  case "blue":
  ...
  break

  default:
  ...
  break
}

Maybe this could be written as: {{#switch colourVariable}}{{#case yellow}} ... {{#case red}} ... {{#case blue }} ... {{#default}} ... {{/switch}}

@Bl4ck-h00d
Copy link

Hi! I would like to work on this feature. Can you please guide me how to get started?

@aryanshukla7
Copy link

Hello, I would like to work on this, can you please guide me on how to get started!

@alsoarpit
Copy link

@OliverTod @DianaLease Hello, I would like to work on this, can you please assigned me this issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants