Skip to content

help? #9

Description

@ben-bay

Running into a bug that doesn't exist when using the Python port of Tracery. When I call grammar.flatten on my rule I get this trace:

.../node_modules/tracery-grammar/tracery.js:657
                    var c = rule.charAt(i);
                                 ^

TypeError: rule.charAt is not a function
    at Object.parse (.../node_modules/tracery-grammar/tracery.js:657:34)
    at TraceryNode.expandChildren (.../node_modules/tracery-grammar/tracery.js:54:36)
    at TraceryNode.expand (.../node_modules/tracery-grammar/tracery.js:94:22)
    at Grammar.expand (.../node_modules/tracery-grammar/tracery.js:512:14)
    at Grammar.flatten (.../node_modules/tracery-grammar/tracery.js:520:25)
    at Object.<anonymous> (.../test_tracery.js:8:29)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)

What am I doing wrong??

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions