Ruby extension to link/style the link

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Ruby extension to link/style the link

Suppose I want a custom macro that both generates a link from the macro text, and styles it - how would I go about that? The current macros our projects uses do the first via

    return, :anchor, target, :type => :link, :target => (target + '.html'))

and the second via

    create_inline parent, :quoted, '<code>' + target + '</code>'

but I've no idea how to string them together - Inline objects aren't text.

N.b. it would be really helpful if there was some concept-level documentation on the API describing the relationship of the various objects and methods in it. I've been wading through the rubydocs and the extensions lab for 45 minutes trying to figure this out, and am exactly as baffled as when I started. Maybe that just demonstrates I'm an idiot, but I find the documentation as it stands is basically useless for a newcomer (which I still am, despite occasionally poking at this stuff over the last 4.5 years).