kenlowrie / avscript

A simple Audio/Visual script formatter that reads a markdown-like text file and converts it to HTML.
Apache License 2.0
1 stars 0 forks source link

Add documentation for @image #7

Open kenlowrie opened 6 years ago

kenlowrie commented 6 years ago

@image _id="" src="" alt="" style="" class=""

This adds an image dict to the internal imagelist[] with the name _id. Removes _id from the dictionary before adding it.

When you use it [_id], it constructs the <IMG> tag on the fly by applying markdown to each element in the dict, and then adding that element to the tag.

Should I allow [!_id] to force it to look at the imagedict instead of looking first in links, then vars?

@image _id="shot1" src="[path]/name.png" alt="alt text" class=""

- [shot1]
    [shot1]

@break
[shot1]
kenlowrie commented 6 years ago

Instead of using the [!id] syntax to force it to look in the image namespace, you need to spell it out like this [image.id]. That same holds for things added with @var, only the prefix is varv2.