Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support markdown TOCs in Populate #480

Closed
fusedFET opened this issue Aug 9, 2023 · 2 comments
Closed

[FEATURE] Support markdown TOCs in Populate #480

fusedFET opened this issue Aug 9, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@fusedFET
Copy link

fusedFET commented Aug 9, 2023

Hello!

Describe the bug

Consider following index.md fed into the 'populate' tool:

# PCBA Manual

- [PCBA Manual](#pcba-manual)
  - [PCB Top assembly](#pcb-top-assembly)
  - [Conclusion](#conclusion)

## PCB Top assembly

First step in the assembly is the populating of the TOP face.

- [[front | ]] This is the front side of the board we are populating

## Conclusion

This is the end of the demo.

Note the auto-generated Table Of Contents by vscode below the main title.

To Reproduce
Run the populate tool on this index.md.
The rendered results will be:

# PCBA Manual


#### [PCB Top assembly](#pcb-top-assembly)

![step](img/populating_1.png)

#### [Conclusion](#conclusion)

![step](img/populating_2.png)

#### [PCBA Manual](#pcba-manual)

![step](img/populating_3.png)

## PCB Top assembly

First step in the assembly is the populating of the TOP face.


####  This is the front side of the board we are populating

![step](img/populating_4.png)

## Conclusion

This is the end of the demo.

The tool seems to see the 'populate' patterns in the TOC. It tries to render unexpected images.

Expected behavior

The generated MD to be:

# PCBA Manual

- [PCBA Manual](#pcba-manual)
  - [PCB Top assembly](#pcb-top-assembly)
  - [Conclusion](#conclusion)
 
## PCB Top assembly

First step in the assembly is the populating of the TOP face.


#### This is the front side of the board we are populating

![step](img/populating_1.png)

## Conclusion

This is the end of the demo.

Environment
Where are you running KiBot:

  • WSL2, kibot on dev-branch.
@set-soft set-soft added the enhancement New feature or request label Aug 15, 2023
@set-soft set-soft changed the title [BUG] Populate tool interferes with markdown TOC [FEATURE] Support markdown TOCs in Populate Aug 15, 2023
@set-soft
Copy link
Member

Hi @fusedFET !
Did you read the docs?

each list item is considered as a single step in populating and will generate an image.

And this is exactly what you say you are getting!

@set-soft
Copy link
Member

The above patch adds some basic support for this TOC case. Check if it works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants