-
Notifications
You must be signed in to change notification settings - Fork 476
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
Execute code block in markdown file #368
Comments
This is an interesting feature! I'm not totally sold on it, but I'll leave it open in case it's something that a lot of people want and would use. |
@linux-china I love Markdown and have used it for years. But I've never seen anything execute code from a Markdown file. I think it's great for documenting code or creating page content for tools like Hugo, etc. but using it as source for some tool as well is cool sounding but instantly strikes me as impractical. Doesn't mean it's a bad idea I'm just not seeing the utility. Can you list any tools that have this sort of feature? And list a use case where this might be better than just targeting a script? |
Might be useful to introduce mask for whom want this feature. |
This was my first idea when I just now found out about Unlike the original idea here, I would not have expected any different format with extra markdown parsing - just read recipes defined in code blocks marked with |
According to markdown attributes, and I think following code block is correct:
|
Should be doable already, here's quick attempt at working with the syntax @linux-china demonstrated:
Then you can run It would be more seamless if #1646 were implemented. |
justfile is very easy, but you know some guys still write code in markdown. For example as following:
With markdown attributes, and
#hello
is recipe name, and.just
means to execute the code with just.The above code is friendly with most editors, and no break.
Updated on 11/29/2023
The text was updated successfully, but these errors were encountered: