Compare commits

...

6 Commits

Author SHA1 Message Date
Tom Milligan
ea6c0a687a Merge pull request #229 from tommilligan/prep-1.20.0
chore: prep v1.20.0 release
2025-06-06 14:53:02 +01:00
Tom Milligan
50b9187ee5 chore: prep v1.20.0 release 2025-06-06 14:35:51 +01:00
Tom Milligan
fbd07ecaf0 Merge pull request #228 from tommilligan/print-collapsed-details
feat: show collapsed content in print view
2025-06-06 14:21:49 +01:00
Tom Milligan
37d03b872e feat: show collapsed content in print view 2025-06-06 12:58:11 +01:00
Tom Milligan
fa91fe3778 Merge pull request #227 from tommilligan/update-deps-2025-06
chore: update dependencies
2025-06-06 12:37:47 +01:00
Tom Milligan
d59dce3533 chore: update dependencies 2025-06-06 12:34:38 +01:00
17 changed files with 1938 additions and 637 deletions

View File

@@ -6,7 +6,7 @@ jobs:
# Fast test before we kick off all the other jobs
fast-test:
name: Fast test
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -31,7 +31,7 @@ jobs:
detailed-test:
needs: fast-test
name: Test main target
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -50,6 +50,8 @@ jobs:
with:
toolchain: stable
components: rustfmt, clippy
- name: Enable Corepack
run: corepack enable
- name: Install node toolchain
uses: actions/setup-node@v4
with:
@@ -70,16 +72,16 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-24.04
rust:
- stable
- beta
- 1.76.0
- 1.82.0
experimental:
- false
include:
# Run a canary test on nightly that's allowed to fail
- os: ubuntu-20.04
- os: ubuntu-24.04
rust: nightly
experimental: true
# Test only stable on Windows, presume we'd get same result on other
@@ -89,7 +91,7 @@ jobs:
experimental: false
exclude:
# Don't bother retesting stable linux, we did it in the comprehensive test
- os: ubuntu-20.04
- os: ubuntu-24.04
rust: stable
experimental: false
runs-on: ${{ matrix.os }}

View File

@@ -25,7 +25,7 @@ jobs:
# binaries, so we use the same glibc version
#
# ref: https://github.com/rust-lang/mdBook/pull/1955
os: ubuntu-20.04
os: ubuntu-24.04
name: x86_64-unknown-linux-gnu.tar.gz
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
@@ -133,7 +133,7 @@ jobs:
publish:
name: Publish to crates.io
needs: github_release
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4

View File

@@ -11,7 +11,7 @@ permissions:
jobs:
publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4

View File

@@ -1,5 +1,12 @@
# Changelog
## v1.20.0
### Changed
- MSRV (minimum supported rust version) is now 1.82.0 ([#227](https://github.com/tommilligan/mdbook-admonish/pull/227))
- Collapsible blocks now show content in print view ([#228](https://github.com/tommilligan/mdbook-admonish/pull/228)). Thanks to [@igor-petruk](https://github.com/igor-petruk) for raising this issue.
## v1.19.0
### Changed

1402
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-admonish"
version = "1.19.0"
version = "1.20.0"
edition = "2021"
rust-version = "1.76.0"
@@ -36,7 +36,7 @@ log = "0.4.21"
mdbook = "0.4.40"
once_cell = "1.19.0"
path-slash = "0.2.1"
pulldown-cmark = "0.11"
pulldown-cmark = "0.13"
regex = "1.10.5"
semver = "1.0.23"
serde = { version = "1.0.203", features = ["derive"] }

View File

@@ -10,7 +10,7 @@ git-repository-url = "https://github.com/tommilligan/mdbook-admonish"
[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.1.0" # do not edit: managed by `mdbook-admonish install`
[preprocessor.admonish.directive.custom]
expensive = { icon = "./money-bag.svg", color = "#24ab38" }

View File

@@ -1,3 +1,5 @@
/node_modules
*.css
*.css.map
.yarn/
.pnp*

View File

@@ -15,5 +15,6 @@
},
"devDependencies": {
"prettier": "^3.0.3"
}
},
"packageManager": "yarn@4.8.1+sha512.bc946f2a022d7a1a38adfc15b36a66a3807a67629789496c3714dd1703d2e6c6b1c69ff9ec3b43141ac7a1dd853b7685638eb0074300386a59c18df351ef8ff6"
}

View File

@@ -92,8 +92,9 @@ $admonitions: (
0 0.2rem 1rem rgba(0, 0, 0, 0.05),
0 0 0.1rem rgba(0, 0, 0, 0.1);
// [print]: Omit shadow as it may lead to rendering errors
// During print mode in browser, pdf renderer
@media print {
// Omit shadow as it may lead to rendering errors
box-shadow: none;
}
@@ -200,6 +201,14 @@ a.admonition-anchor-link {
}
}
// During print mode in browser, pdf renderer
@media print {
// Expand collapsed sections to show details
details.admonition::details-content {
display: contents;
}
}
summary.admonition-title {
details.admonition > &::after {
position: absolute;

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@ title = "mdbook-admonish-integration"
[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.3" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.1.0" # do not edit: managed by `mdbook-admonish install`
after = ["links"]
[[preprocessor.admonish.custom]]

View File

@@ -9,7 +9,7 @@ title = "mdbook-admonish-integration"
[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.3" # do not edit: managed by `mdbook-admonish install`
assets_version = "3.1.0" # do not edit: managed by `mdbook-admonish install`
after = ["links"]
[[preprocessor.admonish.custom]]

View File

@@ -47,17 +47,17 @@
</div>
<div>
<p>Failed with:</p>
<pre><code class="language-log">'title=&quot;' is not a valid directive or TOML key-value pair.
<pre><code class="language-log">'title="' is not a valid directive or TOML key-value pair.
TOML parsing error: TOML parse error at line 1, column 21
|
1 | config = { title=&quot; }
1 | config = { title=" }
| ^
invalid basic string
</code></pre>
<p>Original markdown input:</p>
<pre><code class="language-markdown">```admonish title=&quot;
<pre><code class="language-markdown">```admonish title="
No title, only body
```
</code></pre>

View File

@@ -8,7 +8,7 @@ function eprintln() {
>&2 echo "$1"
}
VERSION="0.4.35"
VERSION="0.4.51"
eprintln "Checking if mdbook $VERSION is installed"
if [[ "$(mdbook --version)" != "mdbook v$VERSION" ]]; then

View File

@@ -1 +1 @@
3.0.3
3.1.0

View File

@@ -86,6 +86,11 @@ html :is(.admonition-title, summary.admonition-title):last-child {
display: initial;
}
@media print {
details.admonition::details-content {
display: contents;
}
}
details.admonition > summary.admonition-title::after {
position: absolute;
top: 0.625em;