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:
parent
03a90c9bf9
commit
64c611847b
1 changed files with 2 additions and 0 deletions
|
@ -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| {
|
||||
|
|
Loading…
Reference in a new issue