From 51f7d2890260e3b97bf9789b091dd98f3a19e02d Mon Sep 17 00:00:00 2001 From: granddaifuku Date: Sat, 6 Mar 2021 14:40:57 +0900 Subject: [PATCH] check the empty markdown --- onlinejudge_verify/documentation/front_matter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onlinejudge_verify/documentation/front_matter.py b/onlinejudge_verify/documentation/front_matter.py index 15e613c3..7a931a5d 100644 --- a/onlinejudge_verify/documentation/front_matter.py +++ b/onlinejudge_verify/documentation/front_matter.py @@ -7,7 +7,7 @@ def _split_front_matter_without_parsing_yaml(content: bytes) -> Tuple[bytes, bytes]: lines = content.splitlines(keepends=True) - if lines[0].rstrip() != _separator: + if len(lines) == 0 or lines[0].rstrip() != _separator: return (b'', content) for i, line in enumerate(lines): if i == 0: