diff options
Diffstat (limited to 'scripts/lib/glfm/update_example_snapshots.rb')
-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 |