Skip to content
Snippets Groups Projects
Select Git revision
  • ag-test
  • rs-test
  • master default protected
  • test-me-pa
  • mksionek-master-patch-52381
  • new-branch-10
  • test-conflicts
  • test-suggestions
  • alejandro-test
  • patch-25
  • winh-test-image-doscussion
  • stg-lfs-image-test-2
  • stg-lfs-image-test
  • test42016
  • issue_42016
  • issue-32709
  • add-codeowners
  • ClemMakesApps-master-patch-62759
  • bvl-staging-test
  • bvl-merge-base-api
  • v9.2.0-rc6 protected
  • v9.2.0-rc5 protected
  • v9.2.0-rc4 protected
  • v9.2.0-rc3 protected
  • v9.1.4 protected
  • v9.2.0-rc2 protected
  • v9.2.0-rc1 protected
  • v9.1.3 protected
  • v8.17.6 protected
  • v9.0.7 protected
  • v9.1.2 protected
  • v9.1.1 protected
  • v9.2.0.pre protected
  • v9.1.0 protected
  • v9.1.0-rc7 protected
  • v9.1.0-rc6 protected
  • v9.0.6 protected
  • v9.1.0-rc5 protected
  • v9.1.0-rc4 protected
  • v9.1.0-rc3 protected
40 results

wiki_pages.rb

  • Timothy Andrew's avatar
    8e71c19a
    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
    History
    Implement the correct linking behaviour in `WikiLinkFilter`.
    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`
Code owners
Assign users and groups as approvers for specific file changes. Learn more.