The natural syntax is a span:

```
This is some content. [this is some HTML content]{.content-visible when-format="html"}
```

The technical complication is that AST blocks currently declare one of Block or Inline (and it might be hard to make a version of this that intelligently knows its context). If we accept the syntax `{.inline-visible when-format="html"}`, then this is simple enough. We could then add `block-visible` and `block-hidden` for uniformity, and alias content-visible to block-visible.


### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/4886

<div type='discussions-op-text'>

<sup>Originally posted by **r-cheologist** March 18, 2023</sup>
Consider a `*.qml` file like this:

    Profile-dependent content follows:

    ::: {.content-visible when-profile="MYPROFILE"}
    Content requiring `--profile MYPROFILE` to be added to a `render` call
    ::::
    ::: {.content-visible when-profile="MYPROFILE"}
    More content requiring `--profile MYPROFILE` to be added to a `render` call
    ::::

This introduces extra hspace between the two containers, which prevents fine grained (non-paragraph spanning) use for example for profiles used for translation into different natural languages.

Can this be prevented? </div>
cscheid
2023-03-19T02:27:03Z
cscheid
v1.4
open
Enhancement: inline version of content-{visible, hidden}
https://github.com/quarto-dev/quarto-cli/issues/4887