Skip to content

resolves #949 Extend edit URL pattern

Implements the first solution describes in issue #949 by adding additional placeholders for the edit_url pattern.

Updating docs/modules/playbook/pages/content-edit-url.adoc:

  • Adding description for new {start_path}, {module}, {family}, and {file_path} placeholders

Updating packages/content-aggregator/lib/aggregate-content.js:

  • Adding EDIT_URL_PATTERN_TEMPLATE_VAR_RX to match %s , {module}, {family}, and {file_path}
  • Changing function assignFileProperties to process and replace additional placeholers {module}, {family}, and {file_path}

Updating packages/content-aggregator/lib/compute-origin.js:

  • Changing EDIT_URL_TEMPLATE_VAR_RX regex to include start_path
  • Changing function computeOrigin() to support additional placeholder {start_path}

Updating packages/content-aggregator/test/aggregate-content-test.js:

  • Adding test case for new {start_path}, {module}, {family}, and {file_path} placeholders

Updating packages/content-aggregator/package.json:

Merge request reports