Skip to content

Getting star original formatting in object macros #112

Open

Description

@staticdev
> object names python
    return ' '.join(args) # python3
< object

+ what [is|are] [the] (name|names) of *
- <call>names <star2></call> // or some other syntax

Is there a syntactic sugar or an easy way of getting 'Jason, Billy and Lara' from 'What are the names of Jason, Billy and Lara?'

Activity

  1. htdinh commented on Nov 20, 2017

    @htdinh
    Contributor

    @staticdev As far as I know, RiveScript preprocesses the message (which remove the non-syntax-related characters such as , Code Line 52 out before getting a reply Code Line 68). At this time of reply it doesn't (can't) recover the original formatting of the stars (in the end a regex match).

  2. htdinh commented on Nov 20, 2017

    @htdinh
    Contributor

    Just in case someone wants to have a quick code. You need to set star2 (otherwise, star alone would return you the choice of name or names).

    + what [is|are] [the] (name|names) of *
    - {formal}<star2>{/formal}
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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