Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24287
EE port: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1720
After https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10563, and while waiting for the build for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1556 to succeed, I couldn't help myself.
We now have:
BlobViewer
s,#L
, which means line number anchors now work to link to specific lines in Markdown source!.blob-viewer[data-type=simple]
that rich JS viewers can fall back to when the rich rendering fails for whatever reason. They should hide()
their own blob viewer (.blob-viewer[data-type=rich]
) and the switch buttons (.js-blob-viewer-switcher
), and show()
that simple fallback viewer, which will be the regular Download or Text view.To do:
The switch can be seen in action with SVG, but also supported for Markdown and IPython Notebooks, as well as other supported Markup formats: