idmillington / undum

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

[Suggestion] Alternate link syntax #27

Closed Oreolek closed 10 years ago

Oreolek commented 10 years ago

I'm using Markdown for the text in my game, and I propose another syntax for the links.

For example, take one-time links. Right now Undum demands this:

<a href="./action" class="once">Text</a>

But Markdown can't handle that, so the links have to be left as HTML tags. I propose something like this:

[Text](./action?once)

which transforms to HTML:

<a href="./action?once">Text</a>

Alternatively, we could find and suggest in official documentation a text preprocessor which supports link classes. As in, "If you're writing a game, these are the libraries that work good with Undum".

idmillington commented 10 years ago

I like that idea a lot, I'm very happy for it to work that way. Is it something you'd be able or willing to implement? I'm happy to code it, but it will be a couple of weeks before I'd get chance.

Oreolek commented 10 years ago

I'll get into it and make a pull request when I'm done. Should be finished faster than a couple of weeks.

idmillington commented 10 years ago

Don't know why this didn't close, but the pull request is now merged.