Skip to content

Commit

Permalink
Make output of info command more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed May 20, 2020
1 parent 0931544 commit 545a8aa
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ private String readContent(String path) throws IOException {
} else if ("```".equals(line)) {
inCode = !inCode;
} else {
if (line.startsWith("=")) {
formattedText.append("\n");
}
formattedText.append(line);
if (inCode || line.startsWith("* ")) {
if (inCode ||
line.matches("^\\s*\\*.*") ||
line.matches("^\\s*\\d+\\..*")) {
formattedText.append("\n");
} else {
formattedText.append(" ");
Expand Down

0 comments on commit 545a8aa

Please sign in to comment.