html-to-markdown 2.27.1 → 2.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
- data/lib/html_to_markdown/version.rb +1 -1
- data/rust-vendor/getrandom/.cargo-checksum.json +1 -1
- data/rust-vendor/getrandom/.cargo_vcs_info.json +1 -1
- data/rust-vendor/getrandom/CHANGELOG.md +62 -43
- data/rust-vendor/getrandom/Cargo.lock +49 -56
- data/rust-vendor/getrandom/Cargo.toml +2 -2
- data/rust-vendor/getrandom/Cargo.toml.orig +2 -2
- data/rust-vendor/getrandom/src/backends/efi_rng.rs +8 -10
- data/rust-vendor/getrandom/src/backends/getentropy.rs +13 -4
- data/rust-vendor/getrandom/src/backends/linux_android_with_fallback.rs +10 -25
- data/rust-vendor/getrandom/src/backends/netbsd.rs +17 -25
- data/rust-vendor/getrandom/src/backends/rdrand.rs +15 -9
- data/rust-vendor/getrandom/src/backends/rndr.rs +2 -1
- data/rust-vendor/getrandom/src/backends/vxworks.rs +7 -3
- data/rust-vendor/getrandom/src/backends/windows.rs +21 -5
- data/rust-vendor/getrandom/src/utils/lazy_bool.rs +39 -0
- data/rust-vendor/getrandom/src/utils/lazy_ptr.rs +57 -0
- data/rust-vendor/html-to-markdown-rs/Cargo.toml +2 -2
- data/rust-vendor/html-to-markdown-rs/src/converter/plain_text.rs +64 -9
- data/rust-vendor/html-to-markdown-rs/src/converter/text_node.rs +2 -1
- data/rust-vendor/html-to-markdown-rs/tests/issue_216_217_regressions.rs +82 -0
- data/rust-vendor/html-to-markdown-rs/tests/plain_output_test.rs +59 -6
- data/rust-vendor/quote/.cargo-checksum.json +1 -1
- data/rust-vendor/quote/.cargo_vcs_info.json +1 -1
- data/rust-vendor/quote/.github/workflows/ci.yml +2 -2
- data/rust-vendor/quote/Cargo.lock +21 -21
- data/rust-vendor/quote/Cargo.toml +2 -2
- data/rust-vendor/quote/Cargo.toml.orig +2 -2
- data/rust-vendor/quote/README.md +0 -1
- data/rust-vendor/quote/src/lib.rs +1 -1
- data/rust-vendor/quote/src/to_tokens.rs +7 -0
- data/rust-vendor/quote/tests/ui/not-quotable.stderr +1 -1
- data/rust-vendor/quote/tests/ui/not-repeatable.stderr +3 -11
- data/rust-vendor/r-efi/.cargo-checksum.json +1 -1
- data/rust-vendor/r-efi/.cargo_vcs_info.json +1 -1
- data/rust-vendor/r-efi/AUTHORS +1 -0
- data/rust-vendor/r-efi/Cargo.lock +1 -1
- data/rust-vendor/r-efi/Cargo.toml +1 -3
- data/rust-vendor/r-efi/Cargo.toml.orig +1 -5
- data/rust-vendor/r-efi/NEWS.md +16 -0
- data/rust-vendor/r-efi/src/base.rs +1 -1
- data/rust-vendor/r-efi/src/lib.rs +27 -12
- data/rust-vendor/r-efi/src/protocols/absolute_pointer.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/block_io.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/bus_specific_driver_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/debug_support.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/debugport.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/decompress.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_from_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_to_text.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/device_path_utilities.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/disk_io.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/disk_io2.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/driver_binding.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/driver_diagnostics2.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/driver_family_override.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/file.rs +28 -28
- data/rust-vendor/r-efi/src/protocols/graphics_output.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/hii_database.rs +24 -24
- data/rust-vendor/r-efi/src/protocols/hii_font.rs +8 -8
- data/rust-vendor/r-efi/src/protocols/hii_font_ex.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/hii_string.rs +10 -10
- data/rust-vendor/r-efi/src/protocols/ip4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/ip6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/load_file.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/loaded_image.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/managed_network.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/memory_attribute.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/mp_services.rs +15 -15
- data/rust-vendor/r-efi/src/protocols/pci_io.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/platform_driver_override.rs +6 -6
- data/rust-vendor/r-efi/src/protocols/rng.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/service_binding.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/shell.rs +81 -81
- data/rust-vendor/r-efi/src/protocols/shell_dynamic_command.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_file_system.rs +2 -2
- data/rust-vendor/r-efi/src/protocols/simple_network.rs +26 -26
- data/rust-vendor/r-efi/src/protocols/simple_text_input.rs +4 -4
- data/rust-vendor/r-efi/src/protocols/simple_text_input_ex.rs +11 -11
- data/rust-vendor/r-efi/src/protocols/simple_text_output.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/tcp4.rs +20 -20
- data/rust-vendor/r-efi/src/protocols/tcp6.rs +18 -18
- data/rust-vendor/r-efi/src/protocols/timestamp.rs +3 -3
- data/rust-vendor/r-efi/src/protocols/udp4.rs +16 -16
- data/rust-vendor/r-efi/src/protocols/udp6.rs +14 -14
- data/rust-vendor/r-efi/src/system.rs +115 -115
- data/rust-vendor/r-efi/src/vendor/intel/console_control.rs +6 -6
- data/rust-vendor/r-efi-5.3.0/.cargo-checksum.json +1 -0
- data/rust-vendor/r-efi-5.3.0/.cargo_vcs_info.json +6 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/publish.yml +39 -0
- data/rust-vendor/r-efi-5.3.0/.github/workflows/rust-tests.yml +125 -0
- data/rust-vendor/r-efi-5.3.0/AUTHORS +74 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.lock +16 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml +70 -0
- data/rust-vendor/r-efi-5.3.0/Cargo.toml.orig +51 -0
- data/rust-vendor/r-efi-5.3.0/Makefile +85 -0
- data/rust-vendor/r-efi-5.3.0/NEWS.md +301 -0
- data/rust-vendor/r-efi-5.3.0/README.md +99 -0
- data/rust-vendor/r-efi-5.3.0/examples/freestanding.rs +34 -0
- data/rust-vendor/r-efi-5.3.0/examples/gop-query.rs +188 -0
- data/rust-vendor/r-efi-5.3.0/examples/hello-world.rs +55 -0
- data/rust-vendor/r-efi-5.3.0/src/base.rs +993 -0
- data/rust-vendor/r-efi-5.3.0/src/hii.rs +1300 -0
- data/rust-vendor/r-efi-5.3.0/src/lib.rs +182 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/absolute_pointer.rs +69 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/block_io.rs +70 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/bus_specific_driver_override.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debug_support.rs +835 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/debugport.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/decompress.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path.rs +82 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_from_text.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_to_text.rs +30 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/device_path_utilities.rs +63 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/disk_io2.rs +58 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_binding.rs +42 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_diagnostics2.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/driver_family_override.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/file.rs +183 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/graphics_output.rs +103 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_database.rs +299 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font.rs +87 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_font_ex.rs +107 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_package_list.rs +14 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/hii_string.rs +71 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip4.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/ip6.rs +264 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/load_file2.rs +15 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image.rs +39 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/loaded_image_device_path.rs +13 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/managed_network.rs +147 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/memory_attribute.rs +40 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/mp_services.rs +121 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/pci_io.rs +203 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/platform_driver_override.rs +46 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/rng.rs +83 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/service_binding.rs +20 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell.rs +295 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_dynamic_command.rs +33 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/shell_parameters.rs +23 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_file_system.rs +26 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_network.rs +196 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input.rs +38 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_input_ex.rs +85 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/simple_text_output.rs +86 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp4.rs +224 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/tcp6.rs +202 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/timestamp.rs +32 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp4.rs +151 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols/udp6.rs +137 -0
- data/rust-vendor/r-efi-5.3.0/src/protocols.rs +54 -0
- data/rust-vendor/r-efi-5.3.0/src/system.rs +1130 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor/intel/console_control.rs +37 -0
- data/rust-vendor/r-efi-5.3.0/src/vendor.rs +10 -0
- data/rust-vendor/tokio/.cargo-checksum.json +1 -1
- data/rust-vendor/tokio/.cargo_vcs_info.json +1 -1
- data/rust-vendor/tokio/CHANGELOG.md +94 -0
- data/rust-vendor/tokio/Cargo.lock +1549 -0
- data/rust-vendor/tokio/Cargo.toml +96 -83
- data/rust-vendor/tokio/Cargo.toml.orig +7 -7
- data/rust-vendor/tokio/README.md +1 -1
- data/rust-vendor/tokio/src/fs/open_options.rs +4 -1
- data/rust-vendor/tokio/src/fs/read.rs +4 -1
- data/rust-vendor/tokio/src/fs/write.rs +4 -1
- data/rust-vendor/tokio/src/io/async_write.rs +3 -4
- data/rust-vendor/tokio/src/io/poll_evented.rs +23 -1
- data/rust-vendor/tokio/src/io/stderr.rs +15 -1
- data/rust-vendor/tokio/src/io/stdout.rs +14 -0
- data/rust-vendor/tokio/src/io/util/async_write_ext.rs +2 -2
- data/rust-vendor/tokio/src/io/util/write_buf.rs +11 -2
- data/rust-vendor/tokio/src/lib.rs +12 -28
- data/rust-vendor/tokio/src/macros/select.rs +6 -8
- data/rust-vendor/tokio/src/net/tcp/socket.rs +25 -1
- data/rust-vendor/tokio/src/net/tcp/stream.rs +40 -1
- data/rust-vendor/tokio/src/process/unix/pidfd_reaper.rs +1 -41
- data/rust-vendor/tokio/src/runtime/blocking/pool.rs +18 -14
- data/rust-vendor/tokio/src/runtime/builder.rs +10 -4
- data/rust-vendor/tokio/src/runtime/handle.rs +3 -2
- data/rust-vendor/tokio/src/runtime/io/driver/uring.rs +49 -61
- data/rust-vendor/tokio/src/runtime/io/driver.rs +6 -5
- data/rust-vendor/tokio/src/runtime/mod.rs +20 -1
- data/rust-vendor/tokio/src/runtime/runtime.rs +71 -1
- data/rust-vendor/tokio/src/runtime/scheduler/current_thread/mod.rs +24 -8
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker.rs +5 -0
- data/rust-vendor/tokio/src/runtime/task/core.rs +1 -0
- data/rust-vendor/tokio/src/runtime/task/join.rs +7 -3
- data/rust-vendor/tokio/src/runtime/task/list.rs +5 -3
- data/rust-vendor/tokio/src/runtime/task/mod.rs +0 -5
- data/rust-vendor/tokio/src/runtime/tests/loom_blocking.rs +39 -1
- data/rust-vendor/tokio/src/signal/mod.rs +6 -17
- data/rust-vendor/tokio/src/signal/registry.rs +1 -1
- data/rust-vendor/tokio/src/signal/unix.rs +24 -44
- data/rust-vendor/tokio/src/signal/windows/sys.rs +52 -64
- data/rust-vendor/tokio/src/signal/windows.rs +35 -23
- data/rust-vendor/tokio/src/sync/mpsc/mod.rs +3 -1
- data/rust-vendor/tokio/src/sync/oneshot.rs +13 -0
- data/rust-vendor/tokio/src/sync/rwlock.rs +4 -5
- data/rust-vendor/tokio/src/sync/tests/loom_oneshot.rs +27 -1
- data/rust-vendor/tokio/src/task/blocking.rs +16 -1
- data/rust-vendor/tokio/src/task/builder.rs +2 -2
- data/rust-vendor/tokio/src/task/mod.rs +1 -1
- data/rust-vendor/tokio/src/task/spawn.rs +8 -3
- data/rust-vendor/tokio/src/task/yield_now.rs +13 -23
- data/rust-vendor/tokio/src/time/clock.rs +62 -0
- data/rust-vendor/tokio/src/util/memchr.rs +32 -4
- data/rust-vendor/tokio/src/util/sharded_list.rs +6 -4
- data/rust-vendor/tokio/tests/fs_link.rs +54 -0
- data/rust-vendor/tokio/tests/io_async_fd_memory_leak.rs +209 -0
- data/rust-vendor/tokio/tests/io_write_buf.rs +56 -0
- data/rust-vendor/tokio/tests/process_issue_7144.rs +8 -0
- data/rust-vendor/tokio/tests/rt_basic.rs +41 -0
- data/rust-vendor/tokio/tests/rt_common_before_park.rs +92 -0
- data/rust-vendor/tokio/tests/rt_metrics.rs +1 -1
- data/rust-vendor/tokio/tests/rt_panic.rs +12 -0
- data/rust-vendor/tokio/tests/rt_shutdown_err.rs +82 -0
- data/rust-vendor/tokio/tests/rt_threaded.rs +49 -1
- data/rust-vendor/tokio/tests/rt_unstable_metrics.rs +32 -0
- data/rust-vendor/tokio/tests/tcp_connect.rs +2 -3
- data/rust-vendor/tokio/tests/tcp_shutdown.rs +1 -3
- data/rust-vendor/tokio/tests/tcp_socket.rs +3 -4
- data/rust-vendor/tokio/tests/tcp_stream.rs +3 -0
- metadata +78 -3
- data/rust-vendor/getrandom/src/utils/lazy.rs +0 -64
|
@@ -49,9 +49,25 @@ const TRUE: BOOL = 1;
|
|
|
49
49
|
#[inline]
|
|
50
50
|
pub fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
|
|
51
51
|
let result = unsafe { ProcessPrng(dest.as_mut_ptr().cast::<u8>(), dest.len()) };
|
|
52
|
-
// `ProcessPrng` is documented to always return
|
|
53
|
-
//
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
// On Windows 10 and later, `ProcessPrng` is documented to always return
|
|
53
|
+
// TRUE. All potential errors are handled during loading of
|
|
54
|
+
// `BCryptPrimitive.dll`. See the "Process base PRNG" section in the
|
|
55
|
+
// aforementioned Windows RNG whitepaper for more information.
|
|
56
|
+
//
|
|
57
|
+
// The Zig project found that Windows 8 implements `ProcessPrng` in a way
|
|
58
|
+
// that may fail and return a value other than `TRUE`. Although recent
|
|
59
|
+
// versions of the Rust toolchain do not support Windows 8, we cannot rule
|
|
60
|
+
// out this backend being used in an executable that will run on Windows 8
|
|
61
|
+
// (e.g. a fork of this crate backported to have an MSRV lower than 1.76,
|
|
62
|
+
// or a fork of the Rust toolchain to support older Windows versions, or
|
|
63
|
+
// other build hacks).
|
|
64
|
+
//
|
|
65
|
+
// Further, Wine's implementation of `ProcessPrng` CAN fail, in every
|
|
66
|
+
// version through Wine 11.2, and this may be the case for any other Windows
|
|
67
|
+
// emulation layers.
|
|
68
|
+
if result == TRUE {
|
|
69
|
+
Ok(())
|
|
70
|
+
} else {
|
|
71
|
+
Err(Error::UNEXPECTED)
|
|
72
|
+
}
|
|
57
73
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
use core::sync::atomic::{AtomicU8, Ordering::Relaxed};
|
|
2
|
+
|
|
3
|
+
/// Lazily caches a `bool` in an `AtomicU8`.
|
|
4
|
+
///
|
|
5
|
+
/// Initialization is intentionally unsynchronized: concurrent callers may race
|
|
6
|
+
/// and run `init` more than once. Once a value is produced, it is cached and
|
|
7
|
+
/// reused by subsequent calls.
|
|
8
|
+
///
|
|
9
|
+
/// Uses `Relaxed` ordering because this helper only publishes the cached
|
|
10
|
+
/// value itself.
|
|
11
|
+
pub(crate) struct LazyBool(AtomicU8);
|
|
12
|
+
|
|
13
|
+
impl LazyBool {
|
|
14
|
+
const UNINIT: u8 = u8::MAX;
|
|
15
|
+
|
|
16
|
+
/// Create new `LazyBool`.
|
|
17
|
+
pub const fn new() -> Self {
|
|
18
|
+
Self(AtomicU8::new(Self::UNINIT))
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// Call the `init` closure and return the result after caching it.
|
|
22
|
+
#[cold]
|
|
23
|
+
fn cold_init(&self, init: impl FnOnce() -> bool) -> bool {
|
|
24
|
+
let val = u8::from(init());
|
|
25
|
+
self.0.store(val, Relaxed);
|
|
26
|
+
val != 0
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/// Retrieve the cached value if it was already initialized or call the `init` closure
|
|
30
|
+
/// and return the result after caching it.
|
|
31
|
+
#[inline]
|
|
32
|
+
pub fn unsync_init(&self, init: impl FnOnce() -> bool) -> bool {
|
|
33
|
+
let val = self.0.load(Relaxed);
|
|
34
|
+
if val == Self::UNINIT {
|
|
35
|
+
return self.cold_init(init);
|
|
36
|
+
}
|
|
37
|
+
val != 0
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
use core::{
|
|
2
|
+
convert::Infallible,
|
|
3
|
+
ptr::{self, NonNull},
|
|
4
|
+
sync::atomic::{AtomicPtr, Ordering::Relaxed},
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
/// Lazily caches a non-null pointer in an `AtomicPtr`.
|
|
8
|
+
///
|
|
9
|
+
/// Initialization is intentionally unsynchronized: concurrent callers may race
|
|
10
|
+
/// and run `init` more than once. Once a value is produced, it is cached and
|
|
11
|
+
/// reused by subsequent calls.
|
|
12
|
+
///
|
|
13
|
+
/// For fallible initialization (`try_unsync_init`), only successful values are
|
|
14
|
+
/// cached; errors are returned to the caller and are not cached.
|
|
15
|
+
///
|
|
16
|
+
/// Uses `Ordering::Relaxed` because this helper only publishes the cached
|
|
17
|
+
/// pointer value. Callers must not rely on this mechanism to synchronize
|
|
18
|
+
/// unrelated memory side effects performed by `init`.
|
|
19
|
+
pub(crate) struct LazyPtr<T>(AtomicPtr<T>);
|
|
20
|
+
|
|
21
|
+
impl<T> LazyPtr<T> {
|
|
22
|
+
/// Create new `LazyPtr`.
|
|
23
|
+
pub const fn new() -> Self {
|
|
24
|
+
Self(AtomicPtr::new(ptr::null_mut()))
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Call the `init` closure and return the result after caching it in the case of success.
|
|
28
|
+
#[cold]
|
|
29
|
+
fn cold_init<E>(&self, init: impl FnOnce() -> Result<NonNull<T>, E>) -> Result<NonNull<T>, E> {
|
|
30
|
+
let val = init()?;
|
|
31
|
+
self.0.store(val.as_ptr(), Relaxed);
|
|
32
|
+
Ok(val)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// Retrieve the cached value if it was already initialized or call the potentially fallible
|
|
36
|
+
/// `init` closure and return the result after caching it in the case of success.
|
|
37
|
+
#[inline]
|
|
38
|
+
pub fn try_unsync_init<E>(
|
|
39
|
+
&self,
|
|
40
|
+
init: impl FnOnce() -> Result<NonNull<T>, E>,
|
|
41
|
+
) -> Result<NonNull<T>, E> {
|
|
42
|
+
let p = self.0.load(Relaxed);
|
|
43
|
+
match NonNull::new(p) {
|
|
44
|
+
Some(val) => Ok(val),
|
|
45
|
+
None => self.cold_init(init),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// Retrieve the cached value if it was already initialized or call the `init` closure
|
|
50
|
+
/// and return the result after caching it.
|
|
51
|
+
#[inline]
|
|
52
|
+
#[allow(dead_code, reason = "Some modules use only `try_unsync_init`")]
|
|
53
|
+
pub fn unsync_init(&self, init: impl FnOnce() -> NonNull<T>) -> NonNull<T> {
|
|
54
|
+
let Ok(p): Result<_, Infallible> = self.try_unsync_init(|| Ok(init()));
|
|
55
|
+
p
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "html-to-markdown-rs"
|
|
3
|
-
version = "2.27.
|
|
3
|
+
version = "2.27.3"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
authors = ["Na'aman Hirschfeld <naaman@kreuzberg.dev>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -40,7 +40,7 @@ serde = { version = "1.0", features = ["derive"], optional = true }
|
|
|
40
40
|
serde_json = { version = "1.0", optional = true }
|
|
41
41
|
async-trait = { version = "0.1", optional = true }
|
|
42
42
|
futures = { version = "0.3", optional = true }
|
|
43
|
-
tokio = { version = "1.
|
|
43
|
+
tokio = { version = "1.50", features = ["rt-multi-thread", "sync"], optional = true }
|
|
44
44
|
|
|
45
45
|
[dev-dependencies]
|
|
46
46
|
serde = { version = "1.0", features = ["derive"] }
|
|
@@ -4,9 +4,23 @@
|
|
|
4
4
|
//! visible text content with structural whitespace, bypassing the full
|
|
5
5
|
//! Markdown/Djot conversion pipeline.
|
|
6
6
|
|
|
7
|
+
use std::fmt::Write;
|
|
8
|
+
|
|
7
9
|
use crate::options::ConversionOptions;
|
|
8
10
|
use crate::text;
|
|
9
11
|
|
|
12
|
+
/// Tracks list context for proper marker emission on `<li>` elements.
|
|
13
|
+
#[derive(Clone, Debug)]
|
|
14
|
+
enum ListContext {
|
|
15
|
+
/// Not inside any list.
|
|
16
|
+
None,
|
|
17
|
+
/// Inside `<ul>` — each `<li>` gets a `- ` prefix.
|
|
18
|
+
Unordered,
|
|
19
|
+
/// Inside `<ol>` — each `<li>` gets a sequential `N. ` prefix.
|
|
20
|
+
/// The `next_index` is incremented after each `<li>`.
|
|
21
|
+
Ordered { next_index: u32 },
|
|
22
|
+
}
|
|
23
|
+
|
|
10
24
|
/// Tags whose content should be skipped entirely.
|
|
11
25
|
const SKIP_TAGS: &[&str] = &["script", "style", "head", "template", "noscript", "svg", "math"];
|
|
12
26
|
|
|
@@ -49,9 +63,10 @@ const BLOCK_TAGS: &[&str] = &[
|
|
|
49
63
|
/// - Inline elements are recursed without markers
|
|
50
64
|
pub fn extract_plain_text(dom: &tl::VDom, parser: &tl::Parser, options: &ConversionOptions) -> String {
|
|
51
65
|
let mut buf = String::with_capacity(1024);
|
|
66
|
+
let mut list_ctx = ListContext::None;
|
|
52
67
|
|
|
53
68
|
for child_handle in dom.children() {
|
|
54
|
-
walk_plain(child_handle, parser, &mut buf, options, false);
|
|
69
|
+
walk_plain(child_handle, parser, &mut buf, options, false, &mut list_ctx);
|
|
55
70
|
}
|
|
56
71
|
|
|
57
72
|
post_process(&mut buf);
|
|
@@ -65,6 +80,7 @@ fn walk_plain(
|
|
|
65
80
|
buf: &mut String,
|
|
66
81
|
options: &ConversionOptions,
|
|
67
82
|
in_pre: bool,
|
|
83
|
+
list_ctx: &mut ListContext,
|
|
68
84
|
) {
|
|
69
85
|
let Some(node) = node_handle.get(parser) else {
|
|
70
86
|
return;
|
|
@@ -105,7 +121,7 @@ fn walk_plain(
|
|
|
105
121
|
}
|
|
106
122
|
"pre" => {
|
|
107
123
|
ensure_blank_line(buf);
|
|
108
|
-
walk_children(tag, parser, buf, options, true);
|
|
124
|
+
walk_children(tag, parser, buf, options, true, list_ctx);
|
|
109
125
|
ensure_blank_line(buf);
|
|
110
126
|
}
|
|
111
127
|
"img" => {
|
|
@@ -123,19 +139,50 @@ fn walk_plain(
|
|
|
123
139
|
walk_table(tag, parser, buf, options);
|
|
124
140
|
ensure_blank_line(buf);
|
|
125
141
|
}
|
|
142
|
+
"ul" => {
|
|
143
|
+
ensure_newline(buf);
|
|
144
|
+
let mut child_ctx = ListContext::Unordered;
|
|
145
|
+
walk_children(tag, parser, buf, options, false, &mut child_ctx);
|
|
146
|
+
ensure_newline(buf);
|
|
147
|
+
}
|
|
148
|
+
"ol" => {
|
|
149
|
+
let start = tag
|
|
150
|
+
.attributes()
|
|
151
|
+
.get("start")
|
|
152
|
+
.flatten()
|
|
153
|
+
.and_then(|v| v.as_utf8_str().parse::<u32>().ok())
|
|
154
|
+
.unwrap_or(1);
|
|
155
|
+
ensure_newline(buf);
|
|
156
|
+
let mut child_ctx = ListContext::Ordered { next_index: start };
|
|
157
|
+
walk_children(tag, parser, buf, options, false, &mut child_ctx);
|
|
158
|
+
ensure_newline(buf);
|
|
159
|
+
}
|
|
126
160
|
"li" => {
|
|
127
161
|
ensure_newline(buf);
|
|
128
|
-
|
|
162
|
+
match list_ctx {
|
|
163
|
+
ListContext::Unordered => {
|
|
164
|
+
buf.push_str("- ");
|
|
165
|
+
}
|
|
166
|
+
ListContext::Ordered { next_index } => {
|
|
167
|
+
let _ = write!(buf, "{}. ", next_index);
|
|
168
|
+
*next_index += 1;
|
|
169
|
+
}
|
|
170
|
+
ListContext::None => {
|
|
171
|
+
// <li> outside a list — emit with bullet as fallback
|
|
172
|
+
buf.push_str("- ");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
walk_children(tag, parser, buf, options, false, list_ctx);
|
|
129
176
|
ensure_newline(buf);
|
|
130
177
|
}
|
|
131
178
|
_ if BLOCK_TAGS.contains(&tag_str) => {
|
|
132
179
|
ensure_blank_line(buf);
|
|
133
|
-
walk_children(tag, parser, buf, options, in_pre);
|
|
180
|
+
walk_children(tag, parser, buf, options, in_pre, list_ctx);
|
|
134
181
|
ensure_blank_line(buf);
|
|
135
182
|
}
|
|
136
183
|
_ => {
|
|
137
|
-
// Inline elements and structural containers (html, body,
|
|
138
|
-
walk_children(tag, parser, buf, options, in_pre);
|
|
184
|
+
// Inline elements and structural containers (html, body, etc.)
|
|
185
|
+
walk_children(tag, parser, buf, options, in_pre, list_ctx);
|
|
139
186
|
}
|
|
140
187
|
}
|
|
141
188
|
}
|
|
@@ -144,11 +191,18 @@ fn walk_plain(
|
|
|
144
191
|
}
|
|
145
192
|
|
|
146
193
|
/// Walk all children of a tag.
|
|
147
|
-
fn walk_children(
|
|
194
|
+
fn walk_children(
|
|
195
|
+
tag: &tl::HTMLTag,
|
|
196
|
+
parser: &tl::Parser,
|
|
197
|
+
buf: &mut String,
|
|
198
|
+
options: &ConversionOptions,
|
|
199
|
+
in_pre: bool,
|
|
200
|
+
list_ctx: &mut ListContext,
|
|
201
|
+
) {
|
|
148
202
|
let children = tag.children();
|
|
149
203
|
let top = children.top();
|
|
150
204
|
for child in top.iter() {
|
|
151
|
-
walk_plain(child, parser, buf, options, in_pre);
|
|
205
|
+
walk_plain(child, parser, buf, options, in_pre, list_ctx);
|
|
152
206
|
}
|
|
153
207
|
}
|
|
154
208
|
|
|
@@ -185,7 +239,8 @@ fn walk_table(table_tag: &tl::HTMLTag, parser: &tl::Parser, buf: &mut String, op
|
|
|
185
239
|
}
|
|
186
240
|
let mut cell_buf = String::new();
|
|
187
241
|
if let Some(tl::Node::Tag(cell_tag)) = cell_handle.get(parser) {
|
|
188
|
-
|
|
242
|
+
let mut cell_list_ctx = ListContext::None;
|
|
243
|
+
walk_children(cell_tag, parser, &mut cell_buf, options, false, &mut cell_list_ctx);
|
|
189
244
|
}
|
|
190
245
|
buf.push_str(cell_buf.trim());
|
|
191
246
|
}
|
|
@@ -188,7 +188,8 @@ pub fn process_text_node(
|
|
|
188
188
|
// the current block's content, not from a previous block's closing.
|
|
189
189
|
// Without this distinction, the second paragraph after a "\n\n" boundary
|
|
190
190
|
// would incorrectly suppress the trailing space before inline elements.
|
|
191
|
-
let
|
|
191
|
+
let safe_start = ctx.block_content_start.min(output.len());
|
|
192
|
+
let current_block_output = &output[safe_start..];
|
|
192
193
|
let at_paragraph_break = current_block_output.ends_with("\n\n");
|
|
193
194
|
if !at_paragraph_break {
|
|
194
195
|
if has_double_newline {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//! Regression tests for issues #216 and #217.
|
|
2
|
+
//!
|
|
3
|
+
//! Both issues report a panic at text_node.rs:191:
|
|
4
|
+
//! "byte index N is out of bounds of ``"
|
|
5
|
+
//!
|
|
6
|
+
//! Root cause: When inline handlers (strong, em, etc.) collect children into a
|
|
7
|
+
//! fresh String buffer while inheriting a parent context with block_content_start
|
|
8
|
+
//! set by a paragraph handler, the index points into the wrong buffer.
|
|
9
|
+
|
|
10
|
+
use html_to_markdown_rs::convert;
|
|
11
|
+
|
|
12
|
+
/// Minimal reproducer: a <details> containing a <p> with <strong> inside.
|
|
13
|
+
/// The <details> handler collects into a fresh buffer, the <p> sets
|
|
14
|
+
/// block_content_start, and the <strong> handler creates yet another fresh
|
|
15
|
+
/// buffer — causing the index to be out of bounds.
|
|
16
|
+
#[test]
|
|
17
|
+
fn test_issue_216_217_details_paragraph_strong_no_panic() {
|
|
18
|
+
let html = r#"
|
|
19
|
+
<div>some preceding content</div>
|
|
20
|
+
<details>
|
|
21
|
+
<summary>Summary text</summary>
|
|
22
|
+
<p><strong>Bold text inside details paragraph
|
|
23
|
+
</strong></p>
|
|
24
|
+
</details>
|
|
25
|
+
"#;
|
|
26
|
+
|
|
27
|
+
let result = convert(html, None);
|
|
28
|
+
assert!(result.is_ok());
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// Same issue can occur with emphasis inside a paragraph inside details.
|
|
32
|
+
#[test]
|
|
33
|
+
fn test_issue_216_217_details_paragraph_em_no_panic() {
|
|
34
|
+
let html = r#"
|
|
35
|
+
<div>some preceding content</div>
|
|
36
|
+
<details>
|
|
37
|
+
<summary>Summary</summary>
|
|
38
|
+
<p><em>Italic text inside details paragraph
|
|
39
|
+
</em></p>
|
|
40
|
+
</details>
|
|
41
|
+
"#;
|
|
42
|
+
|
|
43
|
+
let result = convert(html, None);
|
|
44
|
+
assert!(result.is_ok());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/// The panic can also occur with nested inline elements inside paragraphs
|
|
48
|
+
/// collected by any handler that creates a fresh buffer.
|
|
49
|
+
#[test]
|
|
50
|
+
fn test_issue_216_217_nested_strong_in_paragraph_no_panic() {
|
|
51
|
+
let html = r#"
|
|
52
|
+
<details>
|
|
53
|
+
<p>Some text <strong>bold text with trailing newline
|
|
54
|
+
</strong> more text</p>
|
|
55
|
+
</details>
|
|
56
|
+
"#;
|
|
57
|
+
|
|
58
|
+
let result = convert(html, None);
|
|
59
|
+
assert!(result.is_ok());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// Test with the actual structure pattern from the reported URL.
|
|
63
|
+
#[test]
|
|
64
|
+
fn test_issue_216_217_complex_details_structure() {
|
|
65
|
+
let html = r#"
|
|
66
|
+
<div class="content">
|
|
67
|
+
<section>
|
|
68
|
+
<details>
|
|
69
|
+
<summary>Stratégie adaptation</summary>
|
|
70
|
+
<p><strong>Risque élevé pour les populations
|
|
71
|
+
</strong></p>
|
|
72
|
+
<p>Description du risque avec des détails supplémentaires.</p>
|
|
73
|
+
</details>
|
|
74
|
+
</section>
|
|
75
|
+
</div>
|
|
76
|
+
"#;
|
|
77
|
+
|
|
78
|
+
let result = convert(html, None);
|
|
79
|
+
assert!(result.is_ok());
|
|
80
|
+
let md = result.unwrap();
|
|
81
|
+
assert!(md.contains("Risque"));
|
|
82
|
+
}
|
|
@@ -75,12 +75,7 @@ fn test_plain_blockquote_no_prefix() {
|
|
|
75
75
|
fn test_plain_list_items_on_separate_lines() {
|
|
76
76
|
let html = "<ul><li>First</li><li>Second</li><li>Third</li></ul>";
|
|
77
77
|
let result = convert(html, Some(plain_options())).unwrap();
|
|
78
|
-
|
|
79
|
-
assert!(result.contains("Second"));
|
|
80
|
-
assert!(result.contains("Third"));
|
|
81
|
-
// Items should be on separate lines
|
|
82
|
-
let lines: Vec<&str> = result.lines().filter(|l| !l.is_empty()).collect();
|
|
83
|
-
assert!(lines.len() >= 3, "Expected at least 3 lines, got: {result}");
|
|
78
|
+
assert_eq!(result, "- First\n- Second\n- Third\n");
|
|
84
79
|
}
|
|
85
80
|
|
|
86
81
|
#[test]
|
|
@@ -212,3 +207,61 @@ fn test_plain_pre_preserves_whitespace() {
|
|
|
212
207
|
"Pre blocks should preserve whitespace, got: {result}"
|
|
213
208
|
);
|
|
214
209
|
}
|
|
210
|
+
|
|
211
|
+
#[test]
|
|
212
|
+
fn test_plain_unordered_list_markers() {
|
|
213
|
+
let html = "<ul><li>Alpha</li><li>Beta</li><li>Gamma</li></ul>";
|
|
214
|
+
let result = convert(html, Some(plain_options())).unwrap();
|
|
215
|
+
assert_eq!(result, "- Alpha\n- Beta\n- Gamma\n");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
#[test]
|
|
219
|
+
fn test_plain_ordered_list_markers() {
|
|
220
|
+
let html = "<ol><li>First</li><li>Second</li><li>Third</li></ol>";
|
|
221
|
+
let result = convert(html, Some(plain_options())).unwrap();
|
|
222
|
+
assert_eq!(result, "1. First\n2. Second\n3. Third\n");
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
#[test]
|
|
226
|
+
fn test_plain_ordered_list_custom_start() {
|
|
227
|
+
let html = r#"<ol start="42"><li>First item starting at 42</li><li>Second item</li></ol>"#;
|
|
228
|
+
let result = convert(html, Some(plain_options())).unwrap();
|
|
229
|
+
assert_eq!(result, "42. First item starting at 42\n43. Second item\n");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#[test]
|
|
233
|
+
fn test_plain_nested_lists() {
|
|
234
|
+
let html = "<ul><li>Outer 1<ul><li>Inner A</li><li>Inner B</li></ul></li><li>Outer 2</li></ul>";
|
|
235
|
+
let result = convert(html, Some(plain_options())).unwrap();
|
|
236
|
+
// The outer items should have `- ` prefix and inner items should also have `- ` prefix
|
|
237
|
+
assert!(
|
|
238
|
+
result.contains("- Outer 1"),
|
|
239
|
+
"Expected '- Outer 1' in output, got: {result}"
|
|
240
|
+
);
|
|
241
|
+
assert!(
|
|
242
|
+
result.contains("- Inner A"),
|
|
243
|
+
"Expected '- Inner A' in output, got: {result}"
|
|
244
|
+
);
|
|
245
|
+
assert!(
|
|
246
|
+
result.contains("- Inner B"),
|
|
247
|
+
"Expected '- Inner B' in output, got: {result}"
|
|
248
|
+
);
|
|
249
|
+
assert!(
|
|
250
|
+
result.contains("- Outer 2"),
|
|
251
|
+
"Expected '- Outer 2' in output, got: {result}"
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
#[test]
|
|
256
|
+
fn test_plain_ordered_list_inside_unordered() {
|
|
257
|
+
let html = "<ul><li>Bullet<ol><li>Numbered</li></ol></li></ul>";
|
|
258
|
+
let result = convert(html, Some(plain_options())).unwrap();
|
|
259
|
+
assert!(
|
|
260
|
+
result.contains("- Bullet"),
|
|
261
|
+
"Expected '- Bullet' in output, got: {result}"
|
|
262
|
+
);
|
|
263
|
+
assert!(
|
|
264
|
+
result.contains("1. Numbered"),
|
|
265
|
+
"Expected '1. Numbered' in output, got: {result}"
|
|
266
|
+
);
|
|
267
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":{".cargo_vcs_info.json":"
|
|
1
|
+
{"files":{".cargo_vcs_info.json":"028423ae25f8c28e13cd05257f322bf8db75a4cc42dc24c6d270c47638531281",".github/FUNDING.yml":"b017158736b3c9751a2d21edfce7fe61c8954e2fced8da8dd3013c2f3e295bd9",".github/workflows/ci.yml":"4a8b66b436e23d9078bcf67e652cce0e5bca4129090e8aca1a421f17ba7335ea","Cargo.lock":"c26858e11fd8b6a1ce3f879d5121f558f9e6d614a47341955ac600bfea2394e8","Cargo.toml":"baa198cfd5e82e453e6b8d9bd5435b7a79289edf86f276fc578ee726d39cc870","Cargo.toml.orig":"b6045edc8ab83292438f5651a40949b74d1d85298e523c6f3d8eaeb5f00dbf3a","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"9d6af721967088b8263c0544c0c3c459206998252dd5632a3bdf87cb27ec92be","build.rs":"cd6808c02e476b09a520105e2c6f6d325cccb1ecd542cbbcc836a0ae6f6fb0f1","rust-toolchain.toml":"6bbb61302978c736b2da03e4fb40e3beab908f85d533ab46fd541e637b5f3e0f","src/ext.rs":"dabcf1dbf9a81c2dccbfb85f81a08120f5a15be40616d51434ed4ebdfe0c7283","src/format.rs":"662db1f14106d79aacab400a3176a75989a4437ecaaa85ab88cd9a40b750cc5b","src/ident_fragment.rs":"eed1a7407182c00ddfdc98741eaa6e234a6d2c01755e95f943b27926b8c92243","src/lib.rs":"7cd707302e0915ae8fa9e295fa154eea80a592fac9e85a857f22f3a82442dcc3","src/runtime.rs":"fdb7986b31141627408b51381607f66ef4b69dd81b080c2f6489da267e96b2ba","src/spanned.rs":"713678bf5cb3b4bf2f119dcf64d188a63dc59455a724c3d2567ceab83b734d73","src/to_tokens.rs":"84c81c39c8443d116d031208abcca9f8482b8abf7bde3ee6723b7f987c10b2fd","tests/compiletest.rs":"4e381aa8ca3eabb7ac14d1e0c3700b3223e47640547a6988cfa13ad68255f60f","tests/test.rs":"023d6b57ba5ba199a04d9757e3b1464c2bc09579b035ea82c047e08d89d19226","tests/ui/does-not-have-iter-interpolated-dup.rs":"ad13eea21d4cdd2ab6c082f633392e1ff20fb0d1af5f2177041e0bf7f30da695","tests/ui/does-not-have-iter-interpolated-dup.stderr":"d076d9581ce9f684dcf51aadcf77c206a8a1d3c6774cee14e5d40339ea3ebe07","tests/ui/does-not-have-iter-interpolated.rs":"83a5b3f240651adcbe4b6e51076d76d653ad439b37442cf4054f1fd3c073f3b7","tests/ui/does-not-have-iter-interpolated.stderr":"5b611cd647c162f9d5b52d8c3eb8ed50bd1d7d325671aaf85815d7420e867169","tests/ui/does-not-have-iter-separated.rs":"fe413c48331d5e3a7ae5fef6a5892a90c72f610d54595879eb49d0a94154ba3f","tests/ui/does-not-have-iter-separated.stderr":"43fe592afacc052da2d0c9525bf7160fd4a80effa0949e83fe6291b8d6257dcb","tests/ui/does-not-have-iter.rs":"09dc9499d861b63cebb0848b855b78e2dc9497bfde37ba6339f3625ae009a62f","tests/ui/does-not-have-iter.stderr":"ccd8fb640776402f7fc980be05df5f998b9557f67a0d5d2ab89f2f7b6bd0731a","tests/ui/not-quotable.rs":"5759d0884943417609f28faadc70254a3e2fd3d9bd6ff7297a3fb70a77fafd8a","tests/ui/not-quotable.stderr":"a9748bc9a0a72a17f9c1f96e9b12be3686e9d7d51f120796516e26e5cebf62ad","tests/ui/not-repeatable.rs":"a4b115c04e4e41049a05f5b69450503fbffeba031218b4189cb931839f7f9a9c","tests/ui/not-repeatable.stderr":"72105d3dec4e8ed2a657db7d397e30d452c26c1488cb1e18e23c2d1d137a6f6d","tests/ui/wrong-type-span.rs":"6195e35ea844c0c52ba1cff5d790c3a371af6915d137d377834ad984229ef9ea","tests/ui/wrong-type-span.stderr":"cad072e40e0ecc04f375122ae41aede2f0da2a9244492b3fcf70249e59d1b128"},"package":"41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"}
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
strategy:
|
|
25
25
|
fail-fast: false
|
|
26
26
|
matrix:
|
|
27
|
-
rust: [nightly, stable, beta, 1.83.0, 1.
|
|
27
|
+
rust: [nightly, stable, beta, 1.83.0, 1.71.0]
|
|
28
28
|
timeout-minutes: 45
|
|
29
29
|
steps:
|
|
30
30
|
- uses: actions/checkout@v6
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
if: matrix.rust == 'nightly'
|
|
38
38
|
- run: cargo check
|
|
39
39
|
- run: cargo test
|
|
40
|
-
if: matrix.rust != '1.
|
|
40
|
+
if: matrix.rust != '1.71.0'
|
|
41
41
|
- run: cargo run --manifest-path benches/Cargo.toml
|
|
42
42
|
- uses: actions/upload-artifact@v6
|
|
43
43
|
if: matrix.rust == 'nightly' && always()
|
|
@@ -44,9 +44,9 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
|
44
44
|
|
|
45
45
|
[[package]]
|
|
46
46
|
name = "memchr"
|
|
47
|
-
version = "2.
|
|
47
|
+
version = "2.8.0"
|
|
48
48
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
49
|
-
checksum = "
|
|
49
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
50
50
|
|
|
51
51
|
[[package]]
|
|
52
52
|
name = "proc-macro2"
|
|
@@ -59,16 +59,16 @@ dependencies = [
|
|
|
59
59
|
|
|
60
60
|
[[package]]
|
|
61
61
|
name = "quote"
|
|
62
|
-
version = "1.0.
|
|
62
|
+
version = "1.0.44"
|
|
63
63
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
-
checksum = "
|
|
64
|
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
|
65
65
|
dependencies = [
|
|
66
66
|
"proc-macro2",
|
|
67
67
|
]
|
|
68
68
|
|
|
69
69
|
[[package]]
|
|
70
70
|
name = "quote"
|
|
71
|
-
version = "1.0.
|
|
71
|
+
version = "1.0.45"
|
|
72
72
|
dependencies = [
|
|
73
73
|
"proc-macro2",
|
|
74
74
|
"rustversion",
|
|
@@ -106,7 +106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
106
106
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
107
107
|
dependencies = [
|
|
108
108
|
"proc-macro2",
|
|
109
|
-
"quote 1.0.
|
|
109
|
+
"quote 1.0.44",
|
|
110
110
|
"syn",
|
|
111
111
|
]
|
|
112
112
|
|
|
@@ -134,12 +134,12 @@ dependencies = [
|
|
|
134
134
|
|
|
135
135
|
[[package]]
|
|
136
136
|
name = "syn"
|
|
137
|
-
version = "2.0.
|
|
137
|
+
version = "2.0.117"
|
|
138
138
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
139
|
-
checksum = "
|
|
139
|
+
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
140
140
|
dependencies = [
|
|
141
141
|
"proc-macro2",
|
|
142
|
-
"quote 1.0.
|
|
142
|
+
"quote 1.0.44",
|
|
143
143
|
"unicode-ident",
|
|
144
144
|
]
|
|
145
145
|
|
|
@@ -160,9 +160,9 @@ dependencies = [
|
|
|
160
160
|
|
|
161
161
|
[[package]]
|
|
162
162
|
name = "toml"
|
|
163
|
-
version = "0.
|
|
163
|
+
version = "1.0.3+spec-1.1.0"
|
|
164
164
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
165
|
-
checksum = "
|
|
165
|
+
checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c"
|
|
166
166
|
dependencies = [
|
|
167
167
|
"indexmap",
|
|
168
168
|
"serde_core",
|
|
@@ -175,18 +175,18 @@ dependencies = [
|
|
|
175
175
|
|
|
176
176
|
[[package]]
|
|
177
177
|
name = "toml_datetime"
|
|
178
|
-
version = "0.
|
|
178
|
+
version = "1.0.0+spec-1.1.0"
|
|
179
179
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
180
|
-
checksum = "
|
|
180
|
+
checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e"
|
|
181
181
|
dependencies = [
|
|
182
182
|
"serde_core",
|
|
183
183
|
]
|
|
184
184
|
|
|
185
185
|
[[package]]
|
|
186
186
|
name = "toml_parser"
|
|
187
|
-
version = "1.0.
|
|
187
|
+
version = "1.0.9+spec-1.1.0"
|
|
188
188
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
189
|
-
checksum = "
|
|
189
|
+
checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
|
|
190
190
|
dependencies = [
|
|
191
191
|
"winnow",
|
|
192
192
|
]
|
|
@@ -199,9 +199,9 @@ checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
|
|
|
199
199
|
|
|
200
200
|
[[package]]
|
|
201
201
|
name = "trybuild"
|
|
202
|
-
version = "1.0.
|
|
202
|
+
version = "1.0.116"
|
|
203
203
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
204
|
-
checksum = "
|
|
204
|
+
checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e"
|
|
205
205
|
dependencies = [
|
|
206
206
|
"dissimilar",
|
|
207
207
|
"glob",
|
|
@@ -215,9 +215,9 @@ dependencies = [
|
|
|
215
215
|
|
|
216
216
|
[[package]]
|
|
217
217
|
name = "unicode-ident"
|
|
218
|
-
version = "1.0.
|
|
218
|
+
version = "1.0.24"
|
|
219
219
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
220
|
-
checksum = "
|
|
220
|
+
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
221
221
|
|
|
222
222
|
[[package]]
|
|
223
223
|
name = "winapi-util"
|
|
@@ -251,6 +251,6 @@ checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
|
|
|
251
251
|
|
|
252
252
|
[[package]]
|
|
253
253
|
name = "zmij"
|
|
254
|
-
version = "1.0.
|
|
254
|
+
version = "1.0.21"
|
|
255
255
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
256
|
-
checksum = "
|
|
256
|
+
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "quote"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.45"
|
|
4
4
|
authors = ["David Tolnay <dtolnay@gmail.com>"]
|
|
5
5
|
autobenches = false
|
|
6
6
|
categories = ["development-tools::procedural-macro-helpers"]
|
|
@@ -10,7 +10,7 @@ edition = "2021"
|
|
|
10
10
|
keywords = ["macros", "syn"]
|
|
11
11
|
license = "MIT OR Apache-2.0"
|
|
12
12
|
repository = "https://github.com/dtolnay/quote"
|
|
13
|
-
rust-version = "1.
|
|
13
|
+
rust-version = "1.71"
|
|
14
14
|
|
|
15
15
|
[dependencies]
|
|
16
16
|
proc-macro2 = { version = "1.0.80", default-features = false }
|