这是indexloc提供的服务,不要输入任何密码
Skip to content

Remove table attributes in /help

What does this MR do and why?

For our new table style we are adding two Hugo class attributes that technical writers can choose to apply to individual tables: condensed which can limit the height of long tables, making them scrollable and expandable which adds a button that expands the table in a modal.

Technical writers use Hugo markdown attributes to add this properties to tables. For example:

        | Header 1 | Header 2 |
        |----------|----------|
        | Cell 1   | Cell 2   |
        {.expandable .condensed}

To prevent these Hugo attribute tags from appearing in /help, this MR adds a method to the hugo transformer to remove the tags.

References

Issue #580138

Screenshots or screen recordings

before after

How to set up and validate locally

  1. Pull this branch
  2. Browsing the GDK locally, go to the internal /help
  3. Navigate to an .md page that contains a table (e.g., 127.0.0.1:3000/help/development/fe_guide/accessibility/_index.md)
  4. Add a "condensed" or "expandable" attribute directly under the table without skipping a line (e.g. {.condensed}).
  5. Confirm that the {.condensed} tag is not visible on the page in the /help browser
  6. Try the same thing with another variation, such as {.expandable} or {class="condensed"} or {.expandable .condensed} or {class="expandable condensed"}

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #580138

Edited by Pearl Latteier

Merge request reports

Loading