Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom "inline" tags for Guides #677

Open
mbajolek opened this issue Oct 19, 2018 · 2 comments
Open

Custom "inline" tags for Guides #677

mbajolek opened this issue Oct 19, 2018 · 2 comments

Comments

@mbajolek
Copy link

I haven't found a way to inject (via --tags) option custom guide tag handler. Currently the https://github.com/senchalabs/jsduck/wiki/Guides says about two custom guide tags: {@img and {@link ...

I would like to create a few custom tags e.g.: {@pdf that would expand into:

<object width="100%" height="100%" data="" type="application/pdf"> <embed src="" type="application/pdf" /></object>

or even more generic such {@html ... as html passthrough section.

Is there any way to achieve it with current implementation?

@nene
Copy link
Member

nene commented Oct 19, 2018

Unfortunately not. The custom tags support only allows defining non-inline tags. And inside guides one can only use the inline tags.

@mbajolek
Copy link
Author

so how about adding a new custom/inline tag, let's say quite generic to address all other cases aka: passthrough tag/macro?

{@pass
   <any HTML content>
}

e,g,:

{@pass
   <iframe src="http://my.embedded.site.com"></iframe>
}

I know it's kind of hack but sometimes you don't have a choice :)
I'm trying to model it based on AsciiDoctor Passthrough pattern (or rather antipattern)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants