tag:rubydoc.tenderapp.com,2010-12-26:/discussions/problems/481-custom-tags-handlers-and-templatesRubydoc.info: Discussion 2016-09-18T19:43:17Ztag:rubydoc.tenderapp.com,2010-12-26:Comment/407468812016-09-17T06:27:40Z2016-09-17T06:27:40ZCustom tags, handlers, and templates<div><p>Custom tags are supported when supplied in the command line /
.yardopts file (<code>--tag</code>, etc), but arbitrary Ruby code
is not executed on rubydoc.info (<code>--load</code> is disabled)
by default. We could potentially whitelist the project and allow
code to be executed for this and its gem. It does look like some of
this can be solved with standard <code>--tag</code> calls,
though.</p></div>lsegaltag:rubydoc.tenderapp.com,2010-12-26:Comment/407468812016-09-17T16:34:50Z2016-09-17T16:34:54ZCustom tags, handlers, and templates<div><p>If you'd be willing to whitelist the Capybara project that would
be great, If not - from the documentation I've read - I don't see
how it would possible to get this to work with starndard --tags
calls.</p></div>Thomas Walpoletag:rubydoc.tenderapp.com,2010-12-26:Comment/407468812016-09-18T19:43:17Z2016-09-18T19:43:17ZCustom tags, handlers, and templates<div><p>It wouldn't work exactly the same as you have it, but it may not
be necessary to define custom CodeObjects, since the tags could be
defined on any arbitrary namespace. Using <code>@!parse</code> with
private modules would work, and then included in some class or
extra file markdown document via
<code>{render:TheSelectorModule}</code>. It's not as nicely
automated (you'd have to manually document the
<code>xpath</code>/<code>css</code> calls), but it could work.
Given that you're already defining the filter/locator tags manually
which builds the bulk of your Selectors template, it wouldn't be
that much of a change.</p>
<p>YARD could benefit from some kind of <code>@!parseinto</code>
directive to force parsing in a block, which would allow you to
define macros on the <code>xpath</code>/<code>css</code> calls,
which could simplify some of this and remove the need for custom
templating.</p>
<p>For whitelisting, open an issue on <a href="http://github.com/docmeta/rubydoc.info">http://github.com/docmeta/rubydoc.info</a>
so we can track it there. Thanks!</p></div>lsegal