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

Cyril Hrubis chrubis@suse.cz
Wed Dec 16 11:10:10 CET 2020


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(-)

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];
 	}
-- 
2.26.2



More information about the ltp mailing list