Skip to content

Commit 1943b81

Browse files
authored
Merge pull request #9 from pubmania/checkbox-for-steps
Update main.py and mkdocs.yml to include checkbox for steps.
2 parents 027dcdf + 1c679f7 commit 1943b81

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

main.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def puml(input_string: str):
332332
else:
333333
out += f'\telse (no)\n\t\t\n'
334334
out += f'\tendif\n'
335-
step_line = f"\n\t* {step.strip()}"
335+
step_line = f"\n\t* [ ] {step.strip()}"
336336
# Ignore empty line in steps
337337
elif step != '':
338338
if step.startswith('**') and step.endswith('**'):
@@ -343,7 +343,7 @@ def puml(input_string: str):
343343
else:
344344
# If the step does not start with ** and ends with **, apply standard formatting
345345
out += f'\t:{insert_newlines(p_step.replace("`","").strip(),50)};\n'
346-
step_line = f"\n\t* {step.strip()}"
346+
step_line = f"\n\t* [ ] {step.strip()}"
347347
steps_string += step_line
348348
out += f'\tend\n\t@enduml\n\t```\n\n</div>\n\n'
349349
out = f'{steps_string}\n\n{out}'
@@ -750,4 +750,4 @@ def calculate_amt_in_gms(row):
750750
final_output_string = '\n\n' + image_data_string + cooking_data_string + "\n" + \
751751
ingredient_string + "\n" + cookware_string + "\n\n" +\
752752
steps_dia_string + '\n\n## Nutritional Info\n\n' + netcarb_string + "\n\n\n"+ cooklang_block
753-
return final_output_string
753+
return final_output_string

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ markdown_extensions:
104104
alternate_style: true
105105
- pymdownx.tasklist:
106106
custom_checkbox: true
107+
clickable_checkbox: true
107108
- toc:
108109
permalink: true
109110
- plantuml_markdown:

0 commit comments

Comments
 (0)