Consider replacing/revising EmbedLiveSample's API #5016
Labels
🧑🤝🧑 community
contributions by our wonderful community
idle
live-samples
issues related to live samples (EmbedLiveSample macro)
macros
tracking issues related to kumascript macros
p4
Not urgent, only if time allows
This comes out of #4971.
To make it easier to write live samples, especially in Markdown and especially for translated content, we have a new way for the live sample macro to find the code blocks to use. In this new way the macro looks for code blocks in the same section of the document as the macro call itself. That makes the
id
argument toEmbedLiveSample
redundant.We've been experimenting with removing this argument an replacing it with an empty string, and fixing macros where this doesn't work (e.g. mdn/content#10758).
At this point the
EmbedLiveSample
interface seems in need of some rework. It currently accepts 7 arguments:{{page}}
macro) is one of the most difficult bits of KS (because it introduces a build dependency)So if we make the
id
redundant, of those 7 arguments:The text was updated successfully, but these errors were encountered: