Fix: Only list internal links here, no external ones

Funny side note:

As the commit history reveals, I wasn't active in this repository for
some time.

I first implemented a solution for this problem in about 50 lines of
code. Then I thought that this could be done way simpler, so I rewrote
it in about 20 lines.

Finally, I noticed that I already have infrastructure for this, so this
two-line patch should fix the problem.

Know your codebase, dude!
This commit is contained in:
Matthias Beyer 2016-12-05 14:57:41 +01:00
parent 03a90c9bf9
commit 64c611847b
1 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ fn main() {
fn handle_internal_linking(rt: &Runtime) {
use libimagentrylink::internal::InternalLinker;
use libimagentrylink::external::iter::NoExternalIter;
debug!("Handle internal linking call");
let cmd = rt.cli().subcommand_matches("internal").unwrap();
@ -96,6 +97,7 @@ fn handle_internal_linking(rt: &Runtime) {
match get_entry_by_name(rt, entry) {
Ok(Some(e)) => {
e.get_internal_links()
.map(NoExternalIter::new)
.map(|links| {
let i = links
.filter_map(|l| {