Skip to content

Commit

Permalink
FIX: Improve detection of admonition end, fixing unrendered links in …
Browse files Browse the repository at this point in the history
…PDF (#1738)
  • Loading branch information
Remi-Gau authored Mar 22, 2024
1 parent 28eb790 commit 865c66c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
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.

0 comments on commit 865c66c

Please sign in to comment.