Skip to content

Use link reference syntax for overly-long inline links#8

Merged
thatch merged 2 commits intomainfrom
markdown-long-lines
Jul 15, 2025
Merged

Use link reference syntax for overly-long inline links#8
thatch merged 2 commits intomainfrom
markdown-long-lines

Conversation

@thatch
Copy link
Member

@thatch thatch commented Jul 11, 2025

This requires GfM but is far more readable in prose for things like Google Docs links where the link itself is fairly meaningless. Leaves short-enough links alone.

@thatch thatch requested a review from jag250 July 11, 2025 15:26
This requires GfM but is far more readable in prose for things like Google Docs
links where the link itself is fairly meaningless.  Leaves short-enough links alone.
@thatch thatch force-pushed the markdown-long-lines branch from d7d7c0b to fb2bf7f Compare July 11, 2025 15:33
yield match["node"][0]

def child_for_type(node, typ):
return [c for c in node.children if c.type == typ][0]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious as to why this creates a whole list if it only needs the first element

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either "so it fits on one line" or "laziness" -- updated.

# print(buf.decode())
Path(f).write_bytes(buf)

return exit_code
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed exit_code is never modified. Is it there to enhance readability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover from when this just complained about long links rather than fixing them. Readability works.

@thatch thatch merged commit c5ab645 into main Jul 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants