I know how to insert a line of code inside a table cell. But I cannot do it when I want to insert a code block like this inside a table cell:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
解决方案
You can't without raw HTML.
Most, if not all Markdown implementations which support table syntax only support inline markup within table cells. That means that "block level" constructs can not be used within table cells from Markdown. That means no paragraphs, lists, blockqoutes, code blocks, etc.
If you want to wrap a code block in a table cell in a Markdown document you will need to use raw HTML for the entire table and most likely the code block as well.