Skip to content

Add buildTag() method to Match class #143

@gregjacobs

Description

@gregjacobs

When using the replaceFn, users should be able to call match.buildTag() to get an HtmlTag instance instead of autolinker.getTagBuilder().build( match )

Can also possibly remove the first argument from replaceFn() (currently the Autolinker instance) by passing the Match object as both arguments. The Match object should also have at least mostly the same public interface as Autolinker itself has for use in a replaceFn to maintain as much backward compatibility as possible. Ex:

replaceFn : function( match, sameMatchForBackCompat ) {
    match.getTagBuilder().build( match );  // for back compat with prev 1st arg: autolinker.getTagBuilder().build( match )
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions