From f6b065bff4d53ac7ef2f44c0273c5b69e31d8d60 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 6 Nov 2024 19:01:32 -0800 Subject: [PATCH] Remove commented out tests --- .../elastic_compat_preprocessor/extension.rb | 28 ------------------- .../spec/elastic_compat_preprocessor_spec.rb | 6 ---- 2 files changed, 34 deletions(-) diff --git a/resources/asciidoctor/lib/elastic_compat_preprocessor/extension.rb b/resources/asciidoctor/lib/elastic_compat_preprocessor/extension.rb index 844629b89ac0..c40bdc541a2e 100644 --- a/resources/asciidoctor/lib/elastic_compat_preprocessor/extension.rb +++ b/resources/asciidoctor/lib/elastic_compat_preprocessor/extension.rb @@ -135,20 +135,6 @@ class ElasticCompatPreprocessor < Asciidoctor::Extensions::Preprocessor MACROS = "#{LEGACY}|#{BETA}|#{COMING}|#{DEP}|#{DEV}|#{DISC}|#{GA}|#{PREV}" BLOCK_MACRO_RX = /^\s*(#{MACROS})\[(.*)\]\s*$/ INLINE_MACRO_RX = /(#{MACROS})\[(.*)\]/ - # BETA_BLOCK_MACRO_RX = /^\s*(#{BETA_MACROS})\[(.*)\]\s*$/ - # BETA_INLINE_MACRO_RX = /(#{BETA_MACROS})\[(.*)\]/ - # COMING_BLOCK_MACRO_RX = /^\s*(#{COMING_MACROS})\[(.*)\]\s*$/ - # COMING_INLINE_MACRO_RX = /(#{COMING_MACROS})\[(.*)\]/ - # DEP_BLOCK_MACRO_RX = /^\s*(#{DEP_MACROS})\[(.*)\]\s*$/ - # DEP_INLINE_MACRO_RX = /(#{DEP_MACROS})\[(.*)\]/ - # DEV_BLOCK_MACRO_RX = /^\s*(#{DEV_MACROS})\[(.*)\]\s*$/ - # DEV_INLINE_MACRO_RX = /(#{DEV_MACROS})\[(.*)\]/ - # DISC_BLOCK_MACRO_RX = /^\s*(#{DISC_MACROS})\[(.*)\]\s*$/ - # DISC_INLINE_MACRO_RX = /(#{DISC_MACROS})\[(.*)\]/ - # GA_BLOCK_MACRO_RX = /^\s*(#{GA_MACROS})\[(.*)\]\s*$/ - # GA_INLINE_MACRO_RX = /(#{GA_MACROS})\[(.*)\]/ - # PREV_BLOCK_MACRO_RX = /^\s*(#{PREV_MACROS})\[(.*)\]\s*$/ - # PREV_INLINE_MACRO_RX = /(#{PREV_MACROS})\[(.*)\]/ def process(_document, reader) reader.extend ReaderExtension @@ -236,23 +222,9 @@ def postprocess(line) # First convert the "block" version of these macros. We convert them # to block macros because they are alone on a line line.gsub!(BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(BETA_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(COMING_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(DEP_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(DEV_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(DISC_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(GA_BLOCK_MACRO_RX, '\1::[\2]') - # line.gsub!(PREV_BLOCK_MACRO_RX, '\1::[\2]') # Then convert the "inline" version of these macros. We convert them # to inline macros because they are *not* at the start of the line.... line.gsub!(INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(BETA_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(COMING_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(DEP_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(DEV_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(DISC_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(GA_INLINE_MACRO_RX, '\1:[\2]') - # line.gsub!(PREV_INLINE_MACRO_RX, '\1:[\2]') # Transform Elastic's traditional comment based marking for # AUTOSENSE/KIBANA/CONSOLE snippets into a marker that we can pick # up during tree processing to turn the snippet into a marked up diff --git a/resources/asciidoctor/spec/elastic_compat_preprocessor_spec.rb b/resources/asciidoctor/spec/elastic_compat_preprocessor_spec.rb index 5f8284172200..d96ecb3d9352 100644 --- a/resources/asciidoctor/spec/elastic_compat_preprocessor_spec.rb +++ b/resources/asciidoctor/spec/elastic_compat_preprocessor_spec.rb @@ -227,12 +227,6 @@ let(:name) { 'deprecated_ess' } let(:inline_admon_class) { 'ESS:deprecated' } end - # context 'for discontinued in stack' do - # include_context 'change admonition' - # let(:name) { 'discontinued_stack' } - # let(:block_admon_class) { 'warning' } - # let(:inline_admon_class) { 'change' } - # end end context 'when the document contains include-tagged::' do