Skip to content

Commit 5064c1d

Browse files
committed
Trim trailing empty line from README.md
1 parent 1f3b3f6 commit 5064c1d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,10 @@ update:
3939
insert-example:
4040
./scripts/insert-example.bash
4141

42+
.PHONY: format-doc
43+
format-doc:
44+
# Trim trailing empty line
45+
sed -i -e '$${/^$$/d;}' README.md
46+
4247
.PHONY: after-gen
43-
after-gen: fix format insert-example
48+
after-gen: fix format insert-example format-doc

scripts/insert-example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def sub_match(match):
2020
return read_text(file_name)
2121

2222
text = REPLACE_RE.sub(sub_match, content)
23-
print(text)
23+
print(text, end="")
2424

2525

2626
def parse_args() -> typing.Dict[str, typing.Any]:

0 commit comments

Comments
 (0)