Skip to content

Commit

Permalink
fixed minor problems with automatic tool, adding line div to end
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek128b committed Apr 13, 2024
1 parent 89a9f84 commit b0e94fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions getDataToHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def run(self, lines):
header_match = re.match(r'^\s*#{1,6}\s+(.*)', line)
if header_match:
if in_section:
new_lines.append('<div class="line"></div>') # Add line divider
new_lines.append('</div>') # Close the previous section
new_lines.append('</section>') # Close the previous section
header_content = header_match.group(1).strip()
Expand Down Expand Up @@ -49,6 +50,7 @@ def run(self, lines):
else:
new_lines.append(f'<p>{line.strip()}</p>')
if in_section:
new_lines.append('<div class="line"></div>') # Add line divider
new_lines.append('</div>') # Close the last section
new_lines.append('</section>') # Close the last section
return new_lines
Expand Down
2 changes: 2 additions & 0 deletions output.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ <h2>BQ76942-pcbs-esp32</h2>
src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee"
style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;"></a>
</p>
<div class="line"></div>
</div>
</section>
<section id="test123">
<div class="section">
<h2>test123</h2>
<p>this is very good content lol</p>
<img src="documents/img/BQ76942-diagram.drawioBig.png" alt="no image">
<div class="line"></div>
</div>
</section>

0 comments on commit b0e94fc

Please sign in to comment.