Skip to content

Commit

Permalink
Move markdown comment markers out of code block
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Jun 10, 2024
1 parent 129cc24 commit 1c0bfee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .update-readme-help.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
["duct", "--help"], check=True, text=True, encoding="utf-8", stdout=subprocess.PIPE
).stdout

help_content = f"```shell\n>duct --help\n\n{help_content}\n```\n"
readme = Path("README.md")
text = readme.read_text(encoding="utf-8")
text = re.sub(
r"(?<=<!--- BEGIN HELP -->\n).*(?=^<!--- END HELP -->)",
r"(?<=<!-- BEGIN HELP -->\n).*(?=^<!-- END HELP -->)",
help_content,
text,
flags=re.S | re.M,
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Try it out!

A process wrapper script that monitors the execution of a command.

<!-- BEGIN HELP -->
```shell
> duct --help
>duct --help

<!--- BEGIN HELP -->
usage: duct [-h] [--version] [-p OUTPUT_PREFIX]
[--sample-interval SAMPLE_INTERVAL]
[--report-interval REPORT_INTERVAL] [-c {all,none,stdout,stderr}]
Expand Down Expand Up @@ -62,5 +62,6 @@ options:
-t {all,system-summary,processes-samples}, --record-types {all,system-summary,processes-samples}
Record system-summary, processes-samples, or all
(default: all)
<!--- END HELP -->
```
<!-- END HELP -->

0 comments on commit 1c0bfee

Please sign in to comment.