### Bug description

Im encountering an odd problem when rendering documents into HTML.
First a bit of background. Im using the kernel nbstata to use Stata directly with quarto and VScode.
So far I have no problems, running code, or getting outputs. However, any now and then, when I display the output straight from Stata, something odd happens.

My QMD file is as follows:

```
---
title: "Untitled"
format: 
    html: default
    ipynb: default
    pdf: default
jupyter: nbstata
---
``` 
First setup

```{stata}
clear
ssc instal jwdid
set linesize 250
set seed     111
set sortseed 111
set obs 100  // <- 100 units
gen id = _n
gen ai = rchi2(2)
// determines When would units receive treatment
gen     g = runiformint(2,10)
replace g = 0 if g>9   // never treated       
expand 10   // <-T=10
bysort id:gen t=_n 
gen event = max(0,t-g)
gen aux = runiform()*2
bysort t:gen at = aux[1] // Determines Time fixed effect
gen te = (1-g/10)+(1-event/10)  
// Treatment effect but vanishes with time
gen eit= rnormal()
gen trt  = (t>=g)*(g>0)
gen teff = te * trt 
gen y = ai + at + te * trt + eit
```

then 2 regressions

```{stata}
qui: jwdid y, ivar(i) tvar(t) gvar(g)
estat simple
```

but also

```{stata}
qui: jwdid y, ivar(i) tvar(t) gvar(g) never
estat simple
```

Everything runs correctly, but when looking at the output in HTML, i get two different behaviors.

1. Everything is fine, and produces the following:
```
------------------------------------------------------------------------------
             |            Delta-method
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
   (2 vs 1)  |   1.543749   .1567784     9.85   0.000     1.236469    1.851029
------------------------------------------------------------------------------
```
2. For no reason that I can understand, it also produces the following:
```
------------------------------------------------------------------------------
             |            Delta-method
             | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
   (2 vs 1)  |
   1.458058   .1494798     9.75   0.000     1.165083    1.751033
------------------------------------------------------------------------------
```
Notice the second line, there is a misalignment, compared to the first line.

Exploring the HTML files, the same commands and outcome produce two different things:
When things are correctly rendered
```html
<div class="cell-output cell-output-stdout">
<pre><code>------------------------------------------------------------------------------
             |            Delta-method
             | Coefficient  std. err.      z    P&gt;|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
   (2 vs 1)  |   1.543749   .1567784     9.85   0.000     1.236469    1.851029
------------------------------------------------------------------------------</code></pre>
</div>
```
when things are not correctly rendered

```html
<pre><code>------------------------------------------------------------------------------</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>             |            Delta-method
             | Coefficient  std. err.      z    P&gt;|z|     [95% conf. interval]</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>-------------+----------------------------------------------------------------
         _at |
   (2 vs 1)  |</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>   1.458058   .1494798     9.75   0.000     1.165083    1.751033
------------------------------------------------------------------------------</code></pre>
```
Do you think its something to do with the kernel,? or at the rendering step?

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [ ] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [ ] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [ ] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cscheid
2023-03-22T13:19:07Z
friosavila
upstream jupyter
closed
Problems rendering HTML
https://github.com/quarto-dev/quarto-cli/issues/4918