Skip to content

Fix linkify to handle list-form markdown outputs#1602

Open
ncoop57 wants to merge 1 commit into
mainfrom
fix-linkify-list-md
Open

Fix linkify to handle list-form markdown outputs#1602
ncoop57 wants to merge 1 commit into
mainfrom
fix-linkify-list-md

Conversation

@ncoop57

@ncoop57 ncoop57 commented Jul 8, 2026

Copy link
Copy Markdown

Summary

Fixes the docs build (nbdev-docs / nbdev-proc-nbs), currently broken on main: NbdevLookup.linkify assumes markdown is a string, but notebooks store multiline mime data as lists of lines per the nbformat convention, so add_links crashes with AttributeError: 'list' object has no attribute 'splitlines' on any notebook with a saved markdown output.

Changes

  • Join list input in linkify: if isinstance(md,list): md = ''.join(md) before splitting into lines. The write side re-splits on save, so round-tripping is unchanged.
  • Test: linkify on a list of lines returns the joined, linkified string.

Motivation

Recent fastcore releases write notebooks with nbformat-standard split lines (AnswerDotAI/fastcore#836), so cleaned notebooks now store text/markdown outputs as lists, which linkify had never seen before. This surfaced in PR CI (the docs build check runs on PRs, e.g. #1597) but reproduces on main directly with nbdev-proc-nbs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ncoop57 ncoop57 marked this pull request as ready for review July 8, 2026 01:25
@ncoop57 ncoop57 requested a review from jph00 July 8, 2026 01:25
@ncoop57 ncoop57 added the bug Something isn't working label Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant