invicticide / fractive

Fractive is a free, open-source, Markdown-based hypertext authoring tool for writing interactive fiction.
http://fractive.io
Other
37 stars 5 forks source link

Add an error message when {#function:inline} macros are used. #62

Open NQNStudios opened 6 years ago

NQNStudios commented 6 years ago

Every time I go to call a function and embed the output in a section, I forget whether or not I'm supposed to declare the macro with :inline or not. A specific error message would be nice, because currently what happens if you do the wrong thing (:inline), is you get targetFunction is undefined, which is confusing when you know you've defined the function.

invicticide commented 6 years ago

That error message is obviously nonsense, so I'll look into that. But the broader issue here seems to be that :inline is an unclear name... I wonder if that tag should be called something different?

NQNStudios commented 6 years ago

Yeah, to be honest I thought I had it straight in my head and I still don't. The keyword makes the concept fuzzier in my head which makes it hard to think of a better keyword.

NQNStudios commented 6 years ago

To be clear, inline only applies to macros in link destinations and means the link itself transforms, right? Even now I'm not confident off the top of my head.

invicticide commented 6 years ago

Yeah, :inline is what you add to a link destination to say "replace the link with the expanded destination content when clicked". It has no meaning in any non-link context.

NQNStudios commented 6 years ago

Maybe it should just be :replace