Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • harlowe harlowe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • Games
  • harloweharlowe
  • Issues
  • #55
Closed
Open
Issue created Jul 31, 2016 by Bitbucket Importer@bitbucket_importerOwner

if-condition treats `]` as a closing bracket

Created originally on Bitbucket by Antonymity

Using version 2.0.11 on Windows (twine_2.0.11_win64)

My use case here is adding and subtracting stat points:

hp: 1 [+]

Clicking the + will increase $hp by 1. If $hp > 1 then we want to show a - sign

hp: 2 [+][-]

so you can lower the value.

My code is:

#!javascript

hp: $hp `[`[[+|+hp]]`]`(if: $hp > 1)[`[`[[-|-hp]]`]`]

Unfortunately, the program treats that

#!javascript

`]`

near the end as the closing bracket, even thought I put it within `` to instruct it to display the character instead, and have the last ] on the line as the closing bracket.

What this ends up doing is making my output look like this:

When $hp is 1:

hp: 1 [+]`]

When $hp > 1:

hp: 2 [+][-``]

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking