s
This commit is contained in:
parent
d99bff14cf
commit
09ac51425b
8
main.c
8
main.c
|
|
@ -120,6 +120,7 @@ void checker(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
doitalic(void) {
|
doitalic(void) {
|
||||||
if (!mdt.italic) {
|
if (!mdt.italic) {
|
||||||
|
|
@ -287,7 +288,7 @@ void generate(void) {
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
fprintf(fpto, "\n");
|
fprintf(fpto, "\n");
|
||||||
} else {
|
} else {
|
||||||
i = 0;
|
i = 0;
|
||||||
judul = 0;
|
judul = 0;
|
||||||
|
|
||||||
if (txt[0] == '#') {
|
if (txt[0] == '#') {
|
||||||
|
|
@ -303,12 +304,12 @@ if (txt[0] == '#') {
|
||||||
char *title_start = txt + i;
|
char *title_start = txt + i;
|
||||||
|
|
||||||
if (heading_count == 1) {
|
if (heading_count == 1) {
|
||||||
if (!judul) {
|
if (!judul) {
|
||||||
judul = 1;
|
judul = 1;
|
||||||
fseek(fpto, 0, SEEK_SET);
|
fseek(fpto, 0, SEEK_SET);
|
||||||
fprintf(fpto, "<html>\n<head>\n<meta charset=\"utf-8\"/>\n"
|
fprintf(fpto, "<html>\n<head>\n<meta charset=\"utf-8\"/>\n"
|
||||||
"<title>%s</title>\n<link rel=\"stylesheet\" href=\"style.css\">\n"
|
"<title>%s</title>\n<link rel=\"stylesheet\" href=\"style.css\">\n"
|
||||||
"</head>\n<body>\n\n\n\n\n", title_start);
|
"</head>\n<body>\n\n\n\n", title_start);
|
||||||
fseek(fpto, 0, SEEK_END);
|
fseek(fpto, 0, SEEK_END);
|
||||||
}
|
}
|
||||||
fprintf(fpto, "<h1>%s</h1>", title_start);
|
fprintf(fpto, "<h1>%s</h1>", title_start);
|
||||||
|
|
@ -318,7 +319,6 @@ if (txt[0] == '#') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (len > 1 && txt[0] == '>' && txt[1] != '\\') {
|
else if (len > 1 && txt[0] == '>' && txt[1] != '\\') {
|
||||||
doblockquote();
|
doblockquote();
|
||||||
while (i < len && (txt[i] == '>' || txt[i] == ' ')) i++;
|
while (i < len && (txt[i] == '>' || txt[i] == ' ')) i++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user