Retain the first link encountered in target text. #11

Merged
merged 1 commit into from Jul 3, 2012

Projects

None yet

2 participants

@su
Contributor
su commented Jul 2, 2012

Given slabText is intended for headings, it's relatively unlikely there'd be multiple links, but just in case.
I wasn't sure whether this should be a setting, and it didn't matter in my scenario, so I just left that out. Should be trivial to make it one, though.
You can see this in action at betteridgeslaw.com

@su su Retain the first link encountered in target text.
Given slabText is intended for headings, it's relatively unlikely there'd be multiple links, but just in case.
I wasn't sure whether this should be a setting, and it didn't matter in my scenario, so I just left that out. Should be trivial to make it one, though.
You can see this in action at betteridgeslaw.com
77a8547
@freqdec freqdec merged commit 34f8003 into freqdec:master Jul 3, 2012
@freqdec
Owner
freqdec commented Jul 3, 2012

Hey su, thanks for that. I might tweak it to also re-add the links original "title" (if there was one). Great use of slabtext on your site b.t.w!

@su
Contributor
su commented Jul 5, 2012

On Tue, Jul 3, 2012 at 1:24 AM, Brian McAllister
reply@reply.github.com
wrote:

I might tweak it to also re-add the links original "title" (if there was one).

Good point; that should also be retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment