idmillington / undum

A client-side framework for narrative hypertext interactive fiction.
https://idmillington.github.com/undum
MIT License
336 stars 80 forks source link

forgot the implicit choice syntax #24

Closed Oreolek closed 10 years ago

Oreolek commented 10 years ago

Can't grasp the exact syntax (maybe it's because I used CoffeeScript but everything else works), can you remind me one? The docs don't elaborate on this much.

https://github.com/Oreolek/flower Compiled: https://oreolek.ru/my_games/flower/index.html

[btw, there's also javascript Markdown parsing and smart hyphenation for the game text. I didn't push these features because that's not strictly Undum core.]

idmillington commented 10 years ago

You need a list of tags, or ids, rather than a single one. I should check for this, as I've fallen foul of this myself. It seems obvious that the right thing to do is allow either a single string or a list of strings.

The docs are correct, I think, they say:

To use this, simply pass in the list of ids and tags as the choices option.

But I think it is irrelevant whether the docs are technically correct if the obvious way they should work isn't supported.

idmillington commented 10 years ago

I've made this change, updated the code, comments and documentation to match, and updated the API docs on the site.

Oreolek commented 10 years ago

Thank you.