Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #72112

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6b96fb7
Pointer printing: do not print 0 offset
RalfJung May 1, 2020
6f7e9a8
Add strikethrough support to rustdoc
mibac138 May 5, 2020
abbc736
Add emoji for deprecated messages
GuillaumeGomez May 8, 2020
9d83108
Add test for deprecated emoji
GuillaumeGomez May 8, 2020
bbda107
Add test for strikethrough in rustdoc
mibac138 May 8, 2020
54b7d45
Use CDN for ci-caches on download
Mark-Simulacrum May 8, 2020
0db2aec
display `ConstKind::Param`
lcnr May 9, 2020
0ceacd0
doc: minus (U+2212) instead of dash (U+002D) for negative infinity
tspiteri May 10, 2020
c82103c
use min_specialization for some rustc crates where it requires no cha…
RalfJung May 9, 2020
0aaff14
Improve E0571 wording
GuillaumeGomez May 10, 2020
62116c3
Emit a warning when optimization fuel runs out
jonas-schievink May 9, 2020
806f09c
Clean up E0579 explanation
GuillaumeGomez May 11, 2020
9a4e718
Configure cache domain for GHA
Mark-Simulacrum May 11, 2020
bb8d391
Rollup merge of #71741 - RalfJung:pointer-print, r=oli-obk
Dylan-DPC May 11, 2020
90c1815
Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomez
Dylan-DPC May 11, 2020
eeec611
Rollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,…
Dylan-DPC May 11, 2020
8cc7d5d
Rollup merge of #72027 - Mark-Simulacrum:ci-caches, r=pietroalbini
Dylan-DPC May 11, 2020
d2e24f4
Rollup merge of #72044 - RalfJung:min-spec, r=matthewjasper
Dylan-DPC May 11, 2020
d58d31e
Rollup merge of #72052 - lcnr:const_pprint, r=ecstatic-morse
Dylan-DPC May 11, 2020
c29dc3e
Rollup merge of #72067 - jonas-schievink:fuel-warn, r=varkor
Dylan-DPC May 11, 2020
bdb0179
Rollup merge of #72072 - tspiteri:minus-inf, r=Dylan-DPC
Dylan-DPC May 11, 2020
46eb9e0
Rollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC
Dylan-DPC May 11, 2020
ea603f8
Rollup merge of #72107 - GuillaumeGomez:cleanup-e0579, r=Dylan-DPC
Dylan-DPC May 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add strikethrough support to rustdoc
  • Loading branch information
mibac138 committed May 5, 2020
commit 6f7e9a842debd31590d8f347bd4f7534159d6a91
14 changes: 11 additions & 3 deletions src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use pulldown_cmark::{html, CodeBlockKind, CowStr, Event, Options, Parser, Tag};
mod tests;

fn opts() -> Options {
Options::ENABLE_TABLES | Options::ENABLE_FOOTNOTES
Options::ENABLE_TABLES | Options::ENABLE_FOOTNOTES | Options::ENABLE_STRIKETHROUGH
}

/// When `to_string` is called, this struct will emit the HTML corresponding to
Expand Down Expand Up @@ -933,7 +933,11 @@ impl MarkdownSummaryLine<'_> {
}
};

let p = Parser::new_with_broken_link_callback(md, Options::empty(), Some(&replacer));
let p = Parser::new_with_broken_link_callback(
md,
Options::ENABLE_STRIKETHROUGH,
Some(&replacer),
);

let mut s = String::new();

Expand Down Expand Up @@ -975,7 +979,11 @@ pub fn plain_summary_line(md: &str) -> String {
}
}
let mut s = String::with_capacity(md.len() * 3 / 2);
let p = ParserWrapper { inner: Parser::new(md), is_in: 0, is_first: true };
let p = ParserWrapper {
inner: Parser::new_ext(md, Options::ENABLE_STRIKETHROUGH),
is_in: 0,
is_first: true,
};
p.filter(|t| !t.is_empty()).for_each(|i| s.push_str(&i));
s
}
Expand Down