diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-22 09:11:01 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-22 09:11:01 +0000 |
| commit | 2763994b8f9e44c8ee9bd7197622e6bcba00a4db (patch) | |
| tree | 3af5f9c78673031982f7b3b4baf5df2054e40926 /scripts/lib | |
| parent | c17064b66b122d3f0b05560ea65a66df76537083 (diff) | |
| download | gitlab-ce-2763994b8f9e44c8ee9bd7197622e6bcba00a4db.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/glfm/update_example_snapshots.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/glfm/update_example_snapshots.rb b/scripts/lib/glfm/update_example_snapshots.rb index 893d8d9c014..d8d6cf3cdbc 100644 --- a/scripts/lib/glfm/update_example_snapshots.rb +++ b/scripts/lib/glfm/update_example_snapshots.rb @@ -29,6 +29,8 @@ module Glfm def process(skip_static_and_wysiwyg: false) output('Updating example snapshots...') + setup_environment + output('(Skipping static HTML generation)') if skip_static_and_wysiwyg output("Reading #{GLFM_SPEC_TXT_PATH}...") @@ -47,6 +49,14 @@ module Glfm private + def setup_environment + # Set 'GITLAB_TEST_FOOTNOTE_ID' in order to override random number generation in + # Banzai::Filter::FootnoteFilter#random_number, and thus avoid the need to + # perform normalization on the value. See: + # https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#normalization + ENV['GITLAB_TEST_FOOTNOTE_ID'] = '42' + end + def add_example_names(all_examples) # NOTE: This method and the parse_examples method assume: # 1. Section 2 is the first section which contains examples |
