-
Notifications
You must be signed in to change notification settings - Fork 57
Markdown playground
>>>>> gd2md-html alert: ERRORs: 1; WARNINGs: 0; ALERTS: 1.
- See top comment block for details on ERRORs and WARNINGs.
- In the converted Markdown or HTML, search for inline alerts that start with >>>>> gd2md-html alert: for specific instances that need correction.
Links to alert messages:
alert1>>>>> PLEASE check and correct alert issues and delete this message and the inline alerts.
A code block (note that by default, gd2md-html does not add language descriptors to code blocks, but see
>>>>> gd2md-html alert: undefined internal link (link text: "Code Blocks with lang specification"). Did you generate a TOC?
(Back to top)(Next alert)
>>>>>
Code Blocks with lang specification):
package main
import "fmt"
func main() {
fmt.Println("Hello, 世界")
}
A single-cell table also becomes a code block:
#include<stdio.h>
main()
{
printf("Hello World");
}
If you have any smart quotes in "code"
or code blocks, gd2md-html removes them during the conversion:
func main() {
fmt.Println("Why would you do this?")
}
gd2md-html supports an optional lang specification on the first line of the code sample (in the Doc source). The syntax is: lang: langspec
For example, here is a code block that specifies lang:c
on the first line:
#include<stdio.h>
main()
{
printf("Hello World");
}
This also works in single-cell tables: here is a single-cell table that specifies lang: java
on the first line:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
Code with some embedded HTML tags that should be displayed, not interpreted:
This is <code>some code</code>
and some <strong>bold text</strong>.
A single-cell table with some HTML inside:
This is some code
We want to handle as code block;
Preserve whitespace, <code>HTML tags</code>, etc.
Make a fenced code block in Markdown,
pre in HTML.
gd2md-html generates HTML tables.
A table:
Some text. |
some code
|
More text. | A list: |
You can also merge columns and rows in tables:
This row merges the first three columns.
one |
four | ||
one | two |
These two rows are merged
three |
four |
one | two | four |