Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] mdBook: update to 0.4.1.
Date: Fri, 31 Jul 2020 06:06:37 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23966@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages linkcheck
https://github.com/void-linux/void-packages/pull/23966

mdBook: update to 0.4.1.
Add patch to fix page index in void-docs.

A patch file from https://github.com/void-linux/void-packages/pull/23966.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-linkcheck-23966.patch --]
[-- Type: text/x-diff, Size: 3408 bytes --]

From 17b5f025ad12d16b912959d46dcdd1942815e716 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Fri, 31 Jul 2020 01:05:26 -0300
Subject: [PATCH] mdBook: update to 0.4.1.

Add patch to fix page index in void-docs.
---
 srcpkgs/mdBook/patches/summary.patch | 53 ++++++++++++++++++++++++++++
 srcpkgs/mdBook/template              |  4 +--
 2 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/mdBook/patches/summary.patch

diff --git a/srcpkgs/mdBook/patches/summary.patch b/srcpkgs/mdBook/patches/summary.patch
new file mode 100644
index 00000000000..5ba202fabac
--- /dev/null
+++ b/srcpkgs/mdBook/patches/summary.patch
@@ -0,0 +1,53 @@
+From dcf9462d1e69975d505dfb1b6d4139acb89f10a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
+Date: Tue, 28 Jul 2020 22:54:49 -0300
+Subject: [PATCH] summary: turn SoftBreak events into spaces.
+
+Summary items that had their name split into two lines ended up with the
+last word of one line and the first word of the next line glued
+together, since a space wasn't added.
+
+Added test case for it.
+
+Fixes #1218
+---
+ src/book/summary.rs | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/src/book/summary.rs b/src/book/summary.rs
+index 996913a0a5..4782eb84ac 100644
+--- src/book/summary.rs
++++ src/book/summary.rs
+@@ -569,6 +569,7 @@ fn stringify_events(events: Vec<Event<'_>>) -> String {
+         .into_iter()
+         .filter_map(|t| match t {
+             Event::Text(text) | Event::Code(text) => Some(text.into_string()),
++            Event::SoftBreak => Some(String::from(" ")),
+             _ => None,
+         })
+         .collect()
+@@ -926,4 +927,24 @@ mod tests {
+ 
+         assert_eq!(got, should_be);
+     }
++
++    /// Regression test for https://github.com/rust-lang/mdBook/issues/1218
++    /// Ensure chapter names spread across multiple lines have spaces between all the words.
++    #[test]
++    fn add_space_for_multi_line_chapter_names() {
++        let src = "- [Chapter\ntitle](./chapter.md)";
++        let should_be = vec![SummaryItem::Link(Link {
++            name: String::from("Chapter title"),
++            location: Some(PathBuf::from("./chapter.md")),
++            number: Some(SectionNumber(vec![1])),
++            nested_items: Vec::new(),
++        })];
++
++        let mut parser = SummaryParser::new(src);
++        let got = parser
++            .parse_numbered(&mut 0, &mut SectionNumber::default())
++            .unwrap();
++
++        assert_eq!(got, should_be);
++    }
+ }
diff --git a/srcpkgs/mdBook/template b/srcpkgs/mdBook/template
index a1aa6f83a42..94009860d06 100644
--- a/srcpkgs/mdBook/template
+++ b/srcpkgs/mdBook/template
@@ -1,6 +1,6 @@
 # Template file for 'mdBook'
 pkgname=mdBook
-version=0.4.0
+version=0.4.1
 revision=1
 build_style=cargo
 short_desc="Create book from markdown files. Like Gitbook but implemented in Rust"
@@ -9,7 +9,7 @@ license="MPL-2.0"
 homepage="https://github.com/rust-lang/mdBook"
 changelog="https://raw.githubusercontent.com/rust-lang/mdBook/master/CHANGELOG.md"
 distfiles="https://github.com/rust-lang/mdBook/archive/v${version}.tar.gz"
-checksum=402439a3ce61415bb84f0bf7681e15c96a9ce627c9e2c08647ec8c557c1a9b1a
+checksum=48ee2d7102b440dbdb5ecb0849e82368a57777b03f3d6750ac7c47157b1da7ac
 
 post_install() {
 	vlicense LICENSE

             reply	other threads:[~2020-07-31  4:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  4:06 ericonr [this message]
2020-07-31  4:10 ` ericonr
2020-08-04 18:00 ` [PR PATCH] [Merged]: " jnbr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23966@inbox.vuxu.org \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).