# Generic directives/plugins syntax

**URL:** <https://talk.commonmark.org/t/generic-directives-plugins-syntax/444>\
**Category:** Extensions\
**Created:** [September 6, 2014, 9:50am UTC](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444 "2014-09-06T09:50:24Z")\
**Posts on this page:** 1\
**Showing post:** 100

<div class="post-metadata">

**Author:** ![nexussays](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/nexussays/32/473_2.png) [@nexussays](https://talk.commonmark.org/u/nexussays)\
**Post date:** [October 9, 2014, 10:05pm UTC](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444/100 "2014-10-09T22:05:42Z")

</div>

The use-case you used is the one I _explicitly said_ is in-keeping with the spirit of Markdown.

> For example, I like extending `![]()` to mean “embed this resource” not “create an image tag”. It is keeping with its semantic use and the spirit of MD.

A theoretical `!youtube[Funny video](http://youtu.be/dQw4w9WgXcQ)` would render as “!youtube[Funny video](http://youtu.be/dQw4w9WgXcQ)” which, IMO, is a perfectly acceptable fallback since it still provides a link to the content and the exposed exclamatory declaration isn’t so jarring as to render the output confusing or meaningless.

But to specifically answer your straw man, no, I do not see any problem with this either:

````
```youtube
http://youtu.be/dQw4w9WgXcQ
```

````

It would render as an embed where a “youtube” plugin is available and as

```
http://youtu.be/dQw4w9WgXcQ

```

where no such plugin is available, it’s a reasonable fallback and non-breaking to existing implementations.

* * *

But even that doesn’t answer a multitude of other questions:

- Why would you resolve this to a `<figure>` element?
- Why an iframe instead of an object or video embed?
- What if someone else wanted a different output format? Are there now multiple different potential outputs for “!youtube” depending on what site you’re posting on or what parser you’re using?

---

_[View the full topic](https://talk.commonmark.org/t/generic-directives-plugins-syntax/444)._
