You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-version-sync/0001-chore-Update-pulldown-...

33 lines
1.3 KiB

From 4f9abc6a9c2f4918a445f8217a07849eb42f4bca Mon Sep 17 00:00:00 2001
From: Igor Raits <i.gnatenko.brain@gmail.com>
Date: Sat, 22 Feb 2020 19:11:32 +0100
Subject: [PATCH] chore: Update pulldown-cmark to 0.7
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
---
src/markdown_deps.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/markdown_deps.rs b/src/markdown_deps.rs
index a557c1c..01c45b3 100644
--- a/src/markdown_deps.rs
+++ b/src/markdown_deps.rs
@@ -1,4 +1,4 @@
-use pulldown_cmark::{Event, Parser, Tag};
+use pulldown_cmark::{CodeBlockKind, Event, Parser, Tag};
use semver_parser::range::parse as parse_request;
use semver_parser::range::VersionReq;
use semver_parser::version::parse as parse_version;
@@ -63,7 +63,7 @@ fn find_toml_blocks(text: &str) -> Vec<CodeBlock<'_>> {
let mut code_blocks = Vec::new();
for (event, range) in parser.into_offset_iter() {
match event {
- Event::Start(Tag::CodeBlock(ref lang)) if is_toml_block(lang) => {
+ Event::Start(Tag::CodeBlock(CodeBlockKind::Fenced(ref lang))) if is_toml_block(lang) => {
let line_count = text[..range.start].lines().count();
let code_block = &text[range];
let start = 1 + code_block.find('\n').unwrap_or(0);
--
2.25.0