Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

$[num]variable syntax truncates to zero width and worse in nested templates #786

@irssibot

Description

@irssibot

A working example:

# ...
  join = "$0$1-";
  pad = "|$0|$1-|";
  msgnick = "{pad {join <$0$1->}}%n %|";
  ownmsgnick = "{msgnick $0 $1-}"; 
# ...

The output is, as expected: |<@geralt>|| and demonstrates that the result of join is a single string, i.e. it concatenates multiple arguments into a single argument.

If we replace pad with pad = "|$[-9]0|$1-|"; we get: ||| instead of the expected output: |<@geralt>||
If you try other number you get different things, here are some that I tried:
pad = "|$[-10]0|$1-|"; gives |<||
pad = "|$[-20]0|$1-|"; gives |<@Ownnick||
pad = "|$[-30]0|$1-|"; gives | <@geralt>||
pad = "|$[10]0|$1-|"; gives |<||
pad = "|$[20]0|$1-|"; gives |<@Ownnick||
pad = "|$[30]0|$1-|"; gives |<@geralt> ||
pad = "|$[40]0|$1-|"; gives |<@geralt>...........|| (spaces replaced by dots)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions