convertLineBreaksToNonBreaking() {
    for (const breakEl of document.querySelectorAll('.coding-line br')) {
      const parentNode = breakEl.parentNode;
      if (parentNode.childNodes.length === 1) {
        parentNode.innerHTML = '&nbsp;';
      } else {
        breakEl.remove();
      }
    }
  }
/**
   * Replace &lt;br&gt; elements inside of
   * coding lines to prevent the display of duplicate
   * empty lines
   *
   * @public
   */
Replace <br> elements inside of
coding lines to prevent the display of duplicate
empty lines

@public
Replace <br > elements inside of coding lines to prevent the display of duplicate empty lines @public
convertLineBreaksToNonBreaking() {
    for (const breakEl of document.querySelectorAll('.coding-line br')) {
      const parentNode = breakEl.parentNode;
      if (parentNode.childNodes.length === 1) {
        parentNode.innerHTML = '&nbsp;';
      } else {
        breakEl.remove();
      }
    }
  }
convertLineBreaksToNonBreaking ( ) { for ( const breakEl of document . querySelectorAll ( '.coding-line br' ) ) { const parentNode = breakEl . parentNode ; if ( parentNode . childNodes . length === 1 ) { parentNode . innerHTML = '&nbsp;' ; } else { breakEl . remove ( ) ; } } }
Replace &lt;br&gt; elements inside of
 coding lines to prevent the display of duplicate
 empty lines
Replace &lt ; br&gt ; elements inside of coding lines to prevent the display of duplicate empty lines