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

Crash when adding nested lists inside instructor's notes #355

Open
LourensVeen opened this issue Oct 27, 2022 · 2 comments
Open

Crash when adding nested lists inside instructor's notes #355

LourensVeen opened this issue Oct 27, 2022 · 2 comments
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons solution 💡 A temporary solution is in the comments source: pegboard The source of the issue is in pegboard, but it is still relevant here

Comments

@LourensVeen
Copy link

I'm writing some inline instructor's notes, and inside of them I have a nested list, like this:

::::::::::::::::::::::::::::::::::::: instructor                                
- item
- another item
    - nested item
    - another nested item
::::::::::::::::::::::::::::::::::::::::::::::::

When I then run sandpaper on the project, it says:

 sandpaper::build_lesson(".", preview = FALSE, quiet = FALSE)
── Validating Fenced Divs ───────────────────────────────────────────────────────────────────
Error in .x[[1]] : subscript out of bounds

Markdown supports nested lists, and the syntax is correct, so if this is a limitation I'd expect at least a better error message. Single-level lists work fine at least.

@zkamvar
Copy link
Contributor

zkamvar commented Oct 27, 2022

Thank you for reporting the bug with an example and the error message!

Solution

The solution for now is to make sure you have newlines surrounding your fences:

::::::::::::::::::::::::::::::::::::: instructor
                                
- item
- another item
    - nested item
    - another nested item

::::::::::::::::::::::::::::::::::::::::::::::::

Source of problem

This is a symptom of carpentries/pegboard#84. Effectively, the markdown parser used for pre-flight validation thinks that the closing fence is part of that last list item.

I will try to get a fix to {pegboard} soon that will propagate since that is valid pandoc syntax.

@zkamvar zkamvar added bug Something isn't working source: pegboard The source of the issue is in pegboard, but it is still relevant here solution 💡 A temporary solution is in the comments labels Oct 27, 2022
@LourensVeen
Copy link
Author

Hi, thanks for the response! So that's the problem! I ended up doing

::::::::::::::::::::::::::::::::::::: instructor
- item
- another item
- --- --- **#** nested item
- --- --- **#** another nested item
::::::::::::::::::::::::::::::::::::::::::::::::

which also works, but makes me feel a bit ashamed to write it :-). I'll go put in some newlines instead, thanks!

@zkamvar zkamvar added the frequency: low indicator that a use-case has a low-frequency in lessons label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons solution 💡 A temporary solution is in the comments source: pegboard The source of the issue is in pegboard, but it is still relevant here
Projects
None yet
Development

No branches or pull requests

2 participants