Add file-name info to code block
See original GitHub issueHey, it would be awesome to be able to say state which file one is working on, like so:
<pre><code data-file="prism.js">
... code
</pre></code>
This would add something like http://prismjs.com/plugins/show-language/ with the filename in it.
Although I think it would be nice if it was within the <pre>
tag so that it is all group within a main container.
I am writing some posts with lots of code, so for this it would be very nice to be able to add the filenames.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Give a code block a filename
This seems like something that's easily solved by using a level 4, 5, or 6 header for the file name, just prior to...
Read more >Which Markdown formatting should be used for a filename ...
Which Markdown formatting should be used for a filename of code? - Meta Stack Exchange. Stack Overflow for Teams – Start collaborating and ......
Read more >Code Blocks Extension for filenames and line numbers
I'd like to put forward a proposal to extend code blocks to include a filename, to be used as a caption for the...
Read more >Extended Syntax
Many Markdown processors support syntax highlighting for fenced code blocks. This feature allows you to add color highlighting for whatever language your code...
Read more >File Name Change in CodeBlocks - YouTube
How to change the name of main.cpp using the code :: block's IDE … Show more. Show more. Show less. Comments. 6. Add...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lukasoppermann You can just add a pseudoelement, like so:
Hey @LeaVerou I am totally with you on this, maybe we should open a new ticket to discuss how the language plugin could be extended / replaced with a more generic plugin that serves the old purpose, but also the new?