support of git/github links automatic linking · Issue #16 · robinst/autolink-java · GitHub
Skip to content

support of git/github links automatic linking #16

Description

@McFoggy

in the context of gitbucket/gitbucket#1323 and extending commonmark-java, I'd like to add the possibility to discover links from:

  • git SHA1 references
  • issues & PR ids

The "autolinked references" I'd like to detect are those described in github documentation.

I am currently implementing this, but it requires some internal changes in the project because several scanners will be able to be fired for the same characterset (for example for '@' or [a-zA-Z]). Thus I'd like to know if you would accept such changes. The changes I have in mind:

  • registration of Scanners would be ordered (to establish some precedence)
  • each scanner would be responsible of knowing on which characters it need to be triggered (inversion of responsibility between Scanner & LinkExtractor)
  • for each scan (ie LinkIterator#setNext()), first Scanner answering a Link would win

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions