Skip to content
  • Alejandro Rodríguez's avatar
    Use middleman helpers for links · 0e3e3c01
    Alejandro Rodríguez authored
    This enables us to exploit the advantages of middleman URL management.
    For example, this will allow us to host review apps in subdomains (see
    https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8203 for
    more information).
    
    The regular expression `%a((?:\.[\w-]+)+)\{ ?href:
    ?"([\w\/\-_]+)" ?\} (.+)` was used substituting by `= link_to "$3",
    "$2", class: "$1"`. Other cases were derived from this. Then class names
    were adjusted by replacing `class: "\.([\w\.-]+)"` with `class: "$1"`
    once and `class: "([\w -]+)\.([\w\.-]+)"` with `class: "$1 $2"` as many
    times as necessary. There might be a better approach but this is what I
    came up with :)
    0e3e3c01