Skip to content

Many appended reusable tables are rendered incorrectly #22161

Closed
@achow101

Description

Code of Conduct

What article on docs.github.com is affected?

Several articles that include reusable tables have incorrectly rendered tables. Examples:

#22146 and #22102 also include examples of this issue. This appears to be a largely systemic issue that affects tables that are being appended to each other using reusables.

What part(s) of the article would you like to see updated?

The template tags need to be changed from {% ... %} to {%- ... -%} so that the tables are appended correctly and rendered correctly.

The following script appears to fix many of these issues, but may also have a lot of collateral damage (did not check if it has negative effects, but noticed it affects a lot of non-table reusables):

perl -i -p0e 's/%\}\n\{% data reusables/%\}\n\{%- data reusables/g' $(git grep -l -P "{% data reusables" content)
perl -i -p0e 's/(?<=\{%- data reusables.{1,100})%\}/-%\}/g' $(git grep -l -P "{% data reusables" content)

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions