-
Notifications
You must be signed in to change notification settings - Fork 239
Closed
Description
Hey,
I've been messing with autolinker and found this strange behavior (not sure if this is expected or not, but looks like a bug in first place)
Adding a small snippet which is already tried and tested on runkit as well.
let autolinker = require("autolinker");
let inputText = 'If I add this sample link which is in the markdown format [https://example.com/productdetails.aspx?productid=9999](https://example.com/productdetails.aspx?productid=9999), getUrl method does not correctly works. but if I do this same with this [https://linkedin.com](https://linkedin.com) it works perfectly)'
autolinker.link(inputText, {
replaceFn: (match) => {
if (match.getType() == 'url') {
const matchedUrl = match.getUrl();
console.log(matchedUrl)
}
}
});
Expected Output
https://example.com/productdetails.aspx?productid=9999
https://linkedin.com
Actual Output
https://example.com/productdetails.aspx?productid=9999](https://example.com/productdetails.aspx?productid=9999)
https://linkedin.com
Metadata
Metadata
Assignees
Labels
No labels
