Skip to content

whitespace in span is getting striped out #129

Open
@flip111

Description

@flip111

Input

<div class="code-container">
  <ul class="root code-block">
    <li>
      <span class="type">Bar</span>
    </li>
    <li>
      <ul class="content">
        <li>
          <span class="indentation">  </span>
...truncated...

Output

<div class="code-container">
  <ul class="root code-block">
    <li>
      <span class="type">Bar</span>
    </li>
    <li>
      <ul class="content">
        <li>
          <span class="indentation"></span>
...truncated...

Problem
The two spaces in <span class="indentation"> </span> are gone.

My css looks like this

.indentation {
  display: inline-block;
  white-space: pre;
}

In case mangling whitespace is unavoidable consider:

  1. not disturbing whitespace when open and close tag is on the same line
  2. not disturbing whitespace specifically
  3. not disturbing whitespace when tag has white-space: pre; associated with it

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions