чување bd64c3492c80db001a120d4f02e9a609882fbec5
родитељ 23ebd520509f26f518b30efdf641536fe5e5ae39
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Tue, 23 Mar 2021 19:11:57 +0100
Added skipping extra whitespace when processing the text of footnotes
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 3, додавања: 10(+), брисања: 8(-)
diff --git a/index.html b/index.html
@@ -153,7 +153,7 @@ this program. If not, see <<a href="https://www.gnu.org/licenses">https://www
<div id="git-log">
Previous commit:
-index.slw a3e30e4 2021-03-20 19:53:53 +0100 (Страхиња Радић) (HEAD -> master, origin/master, origin/HEAD)
+index.slw 23ebd52 2021-03-22 16:19:03 +0100 (Страхиња Радић) (HEAD -> master, origin/master, origin/HEAD)
</div><!--git-log-->
diff --git a/slweb.1.in b/slweb.1.in
@@ -41,7 +41,7 @@ This program is licensed under GNU GPL v3 or later. See the file
in the slweb repository for details.
.
.SH DESCRIPTION
-.B Slweb
+.B slweb
is a static website generator which aims at being simplistic. It transforms
custom Markdown-like syntax into
.SM HTML.
diff --git a/slweb.c b/slweb.c
@@ -1120,9 +1120,6 @@ process_incdir_subdir(const char* subdirname, const uint8_t* link_prefix,
saved_state = state;
state = ST_NONE;
- saved_state = state;
- state = ST_NONE;
-
/* First pass: read YAML, macros and links */
result = slweb_parse(buffer, output, TRUE, TRUE);
@@ -3362,14 +3359,19 @@ slweb_parse(uint8_t* buffer, FILE* output, BOOL body_only,
RESET_TOKEN(token, ptoken, token_size)
state &= ~ST_FOOTNOTE;
footnote_at_line_start = FALSE;
+ pline++;
+ colno++;
if (footnote_definition)
{
- state |= ST_FOOTNOTE_TEXT;
pline++;
colno++;
+ while (*pline == ' ' || *pline == '\t')
+ {
+ pline++;
+ colno++;
+ }
+ state |= ST_FOOTNOTE_TEXT;
}
- pline++;
- colno++;
}
else if (state & ST_LINK_SECOND_ARG)
{