Skip to content

Commit a0bea4b

Browse files
authored
Merge pull request #116 from EXILL-SUARL/exilvm/issue104
Make the Markdown template dynamic
2 parents 6cb75d4 + 205befd commit a0bea4b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Diff for: tests/md-to-doc/assets/template.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# Demo
2-
3-
- [Alice likes red green yellow ](http://example.org/alice)
4-
5-
- [Bob likes orange ](http://example.org/bob)
6-
1+
# {{title}}
72

3+
{% for user in users -%}
4+
- [{{ user.username }} likes {% for color in user.fav_colors -%}{{ color }} {% endfor %}]({{ user.url }})
5+
{% endfor %}

Diff for: tests/md-to-doc/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ OUTPUT_FILE=$OUTPUT_DIR/template.html
99

1010
RUST_BACKTRACE=1 md-to-doc.sh "$(cat $INPUT_DATA)" $INPUT_TEMPLATE $OUTPUT_DIR
1111

12-
STRINGS_TO_CHECK=('<h1>Demo</h1>' '<p><a href="http://example.org/alice">Alice likes red green yellow </a></p>' '<p><a href="http://example.org/bob">Bob likes orange </a></p>')
12+
STRINGS_TO_CHECK=('<h1>Demo</h1>' '<li><a href="http://example.org/alice">Alice likes red green yellow </a></li>' '<li><a href="http://example.org/bob">Bob likes orange </a></li>')
1313

1414
for STRING in "${STRINGS_TO_CHECK[@]}"; do
1515
if ! grep -q "$STRING" "$OUTPUT_FILE" ; then

0 commit comments

Comments
 (0)