-
Notifications
You must be signed in to change notification settings - Fork 177
add options to show fenced block source #607
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
base: main
Are you sure you want to change the base?
Conversation
mbostock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be echo: false, but there are a couple other considerations, namely
-
whether the
echooption should be scoped under aexecuteobject like Quarto execution options (though I don’t think I’d use the nameexecute) so we can have other options there too, namelyrun: falseif you want to disable run by default and -
language-specific options (e.g., turning on
echoforjs, but turning it off forhtml). So maybe the scope should bejsorhtmlfor language-specific options, and top-level for all languages, with suitable precedence.
|
i've not been able to come up with any great alternatives to an "execute". maybe 'construct'? for |
|
Sorry for not being clear. The alternative I was suggesting was to use the language. So, js:
echo: truemeans turn on echo: truemeans turn it on for all blocks. |
adds global and front-matter options to show fenced block source code. i am happy to change up the syntax, and/or semantics if folks have good alternatives, but here is what i have implemented. btw: i considered a boolean, but went with the "show" string to indicate the specific action. in
observablehq.config.tsadd:and in front-matter:
in both cases, values other than "show" will have no effect.
echotakes precedence over front-matterblocks, which takes precedence overobservablehq.config.tsblocks.hmmm...
as i look back at the issues, it may be this option was always intended to be called 'echo' in config and front-matter. which would make sense. let me know if i should switch over to that.
closes #156