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

FIX: Improve detection of admonition end, fixing unrendered links in PDF #1738

Merged
merged 9 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pdf_build_src/remove_admonitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def remove_admonitions(
counter += 1
continue

if not line.startswith(indent):
if line != "\n" and not line.startswith(indent):
is_admonition = False

if is_admonition:
Expand Down
11 changes: 11 additions & 0 deletions pdf_build_src/tests/data/expected/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ Collapsible admonitions start with 3 questions marks (`???`).

Collapsible admonitions that will be shown as expanded
start with 3 questions marks and a plus sign (`???+`).



Let's see

- [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
- foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

More of the admonition

And here we resume normal thing.
13 changes: 13 additions & 0 deletions pdf_build_src/tests/data/input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,16 @@ come in different type. In aaddtion of the classical admonitions show above you

Collapsible admonitions that will be shown as expanded
start with 3 questions marks and a plus sign (`???+`).



!!! example "non ordered list should be handle propeler"

Let's see

- [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)
- foo bar [`UK biobank`](https://github.com/bids-standard/bids-examples/tree/master/genetics_ukbb)

More of the admonition

And here we resume normal thing.