diff mbox series

[3/5] docparse/docparse: Eat only first whitespace for comment block

Message ID 20201216101012.14644-4-chrubis@suse.cz
State Accepted
Headers show
Series Small docparser fixes | expand

Commit Message

Cyril Hrubis Dec. 16, 2020, 10:10 a.m. UTC
Since we decided that the comment block is formatted in asciidoc we need
the whitespaces since they are part of the format, e.g. literal blocks.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 docparse/docparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Petr Vorel Dec. 17, 2020, 3:39 p.m. UTC | #1
> Since we decided that the comment block is formatted in asciidoc we need
> the whitespaces since they are part of the format, e.g. literal blocks.
Makes sense.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
diff mbox series

Patch

diff --git a/docparse/docparse.c b/docparse/docparse.c
index 702820757..9f617c8bb 100644
--- a/docparse/docparse.c
+++ b/docparse/docparse.c
@@ -31,7 +31,7 @@  static const char *eat_asterisk_space(const char *c)
 		i++;
 
 	if (c[i] == '*') {
-		while (isspace(c[i+1]))
+		if (isspace(c[i+1]))
 			i++;
 		return &c[i+1];
 	}