You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asciidoctor: Make Edit Me links know about repos (#661)
The "Edit Me" link generation in Asciidoctor was basically a copy of the
asciidoc implementation which was simple because it *had* to be simple.
The asciidoctor implementation had trouble dealing with books built from
multiple repositories because the asciidoc implementation does. The
asciidoc implementation works around it by allowing files to set their
`edit_url` whenever they include a book from a different repo. We had a
bug the asciidoctor implementation that led to cross repo links not
working that was unrelated, but it led me to notice how silly this whole
thing was.
This change replaces way that asciidoctor finds the edit url. We now
pass in an attribute with the root of each repo and the edit me url for
that root. When we want to generate the a link we pick the first repo
that contains the path of the asciidoctor file and use it's associated
url. This is nice because it dosen't need anything like `repo_root` and
it can automatically handle the edit me links, allowing us to remove the
overridden links when we shift books to asciidoctor.
0 commit comments