aio/tools/transforms/remark-package/services/renderMarkdown.js
function plainHTMLBlocks() {

    const plainBlocks = ['code-example', 'code-tabs'];

    // Create matchers for each block
    const anyBlockMatcher = new RegExp('^' + createOpenMatcher(`(${plainBlocks.join('|')})`));

    const Parser = this.Parser;
    const blockTokenizers = Parser.prototype.blockTokenizers;
    const blockMethods = Parser.prototype.blockMethods;

    blockTokenizers.plainHTMLBlocks = tokenizePlainHTMLBlocks;
    blockMethods.splice(blockMethods.indexOf('html'), 0, 'plainHTMLBlocks');

    function tokenizePlainHTMLBlocks(eat, value, silent) {
      const openMatch = anyBlockMatcher.exec(value);
      if (openMatch) {
        const blockName = openMatch[1];
        try {
          const fullMatch = matchRecursiveRegExp(value, createOpenMatcher(blockName), createCloseMatcher(blockName))[0];
          if (silent || !fullMatch) {
            // either we are not eating (silent) or the match failed
            return !!fullMatch;
          }
          return eat(fullMatch[0])({
            type: 'html',
            value: fullMatch[0]
          });
        } catch(e) {
          this.file.fail('Unmatched plain HTML block tag ' + e.message);
        }
      }
    }
  }
function plainHTMLBlocks() {

    const plainBlocks = ['code-example', 'code-tabs'];

    // Create matchers for each block
    const anyBlockMatcher = new RegExp('^' + createOpenMatcher(`(${plainBlocks.join('|')})`));

    const Parser = this.Parser;
    const blockTokenizers = Parser.prototype.blockTokenizers;
    const blockMethods = Parser.prototype.blockMethods;

    blockTokenizers.plainHTMLBlocks = tokenizePlainHTMLBlocks;
    blockMethods.splice(blockMethods.indexOf('html'), 0, 'plainHTMLBlocks');

    function tokenizePlainHTMLBlocks(eat, value, silent) {
      const openMatch = anyBlockMatcher.exec(value);
      if (openMatch) {
        const blockName = openMatch[1];
        try {
          const fullMatch = matchRecursiveRegExp(value, createOpenMatcher(blockName), createCloseMatcher(blockName))[0];
          if (silent || !fullMatch) {
            // either we are not eating (silent) or the match failed
            return !!fullMatch;
          }
          return eat(fullMatch[0])({
            type: 'html',
            value: fullMatch[0]
          });
        } catch(e) {
          this.file.fail('Unmatched plain HTML block tag ' + e.message);
        }
      }
    }
  }
function plainHTMLBlocks ( ) { const plainBlocks = [ 'code-example' , 'code-tabs' ] ; // Create matchers for each block const anyBlockMatcher = new RegExp ( '^' + createOpenMatcher ( ` ${ plainBlocks . join ( '|' ) } ` ) ) ; const Parser = this . Parser ; const blockTokenizers = Parser . prototype . blockTokenizers ; const blockMethods = Parser . prototype . blockMethods ; blockTokenizers . plainHTMLBlocks = tokenizePlainHTMLBlocks ; blockMethods . splice ( blockMethods . indexOf ( 'html' ) , 0 , 'plainHTMLBlocks' ) ; function tokenizePlainHTMLBlocks ( eat , value , silent ) { const openMatch = anyBlockMatcher . exec ( value ) ; if ( openMatch ) { const blockName = openMatch [ 1 ] ; try { const fullMatch = matchRecursiveRegExp ( value , createOpenMatcher ( blockName ) , createCloseMatcher ( blockName ) ) [ 0 ] ; if ( silent || ! fullMatch ) { // either we are not eating (silent) or the match failed return ! ! fullMatch ; } return eat ( fullMatch [ 0 ] ) ( { type : 'html' , value : fullMatch [ 0 ] } ) ; } catch ( e ) { this . file . fail ( 'Unmatched plain HTML block tag ' + e . message ) ; } } } }
Teach remark that some HTML blocks never include markdown
Teach remark that some HTML blocks never include markdown