• Timothy Andrew's avatar
    Implement the correct linking behaviour in `WikiLinkFilter`. · 8e71c19a
    Timothy Andrew authored
    Original Comments
    =================
    
    - Linking behaves as per rules documented here:
      https://gitlab.com/gitlab-org/gitlab-ce/blob/16568-document-wiki-linking-behavior/doc/markdown/wiki.md
    - All links (to other wiki pages) are rewritten to be at the level of
      the app root. We can't use links relative to the current
      page ('./foo', 'foo', '../foo'), because they won't work in the
      markdown preview, where the current page is suffixed with `/edit`
    - Move existing `WikiLinkFilter` specs to `WikiPipeline` spec. It makes
      sense to run these tests on the combined output of the pipeline,
      rather than a single filter, since we can catch issues with
      conflicting filters.
    - Add more tests to cover the new linking
    
    @rymai's Review
    ===============
    
    - Classes nested under `WikiLinkFilter` should declare `WikiLinkFilter`'s
      inherit, so nothing changes if the nested class is loaded first.
    - Add a blank line after a guard clause
    - Use keyword arguments for the `Rewriter` constructor
    - Invert a condition - use `if` instead of `unless`
    - Inline a `let` in `WikiPipeline` spec - it was only used in a single place
    - Change out of date spec names
    - Add a comment for every rewrite rule in `Rewriter`
    8e71c19a
Name
Last commit
Last update
app Loading commit data...
bin Loading commit data...
builds Loading commit data...
config Loading commit data...
db Loading commit data...
doc Loading commit data...
docker Loading commit data...
features Loading commit data...
fixtures/emojis Loading commit data...
generator_templates/active_record/migration Loading commit data...
lib Loading commit data...
log Loading commit data...
public Loading commit data...
scripts Loading commit data...
shared Loading commit data...
spec Loading commit data...
tmp Loading commit data...
vendor Loading commit data...
.csscomb.json Loading commit data...
.flayignore Loading commit data...
.foreman Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.hound.yml Loading commit data...
.pkgr.yml Loading commit data...
.rspec Loading commit data...
.rubocop.yml Loading commit data...
.ruby-version Loading commit data...
.scss-lint.yml Loading commit data...
.simplecov Loading commit data...
.teatro.yml Loading commit data...
CHANGELOG Loading commit data...
CONTRIBUTING.md Loading commit data...
GITLAB_SHELL_VERSION Loading commit data...
GITLAB_WORKHORSE_VERSION Loading commit data...
Gemfile Loading commit data...
Gemfile.lock Loading commit data...
LICENSE Loading commit data...
MAINTENANCE.md Loading commit data...
PROCESS.md Loading commit data...
Procfile Loading commit data...
README.md Loading commit data...
Rakefile Loading commit data...
VERSION Loading commit data...
config.ru Loading commit data...
doc_styleguide.md Loading commit data...
docker-compose.yml Loading commit data...