Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation option might add an extra space #288

Open
Julow opened this issue Jul 13, 2021 · 0 comments
Open

Indentation option might add an extra space #288

Julow opened this issue Jul 13, 2021 · 0 comments

Comments

@Julow
Copy link
Contributor

Julow commented Jul 13, 2021

The following code renders differently in the browser whether the indent option is enabled or not:

  <p>
   <span class="some padding ............................">some text here
    . and here
   </span>
  </p>

A line break is inserted between the two txt nodes. The extra breaks inside the p elements also change what C-A, C-C copies into the clipboard.

open Tyxml.Html

let content =
  html
    (head (title (txt "example")) [])
    (body
       [
         p
           [
             span
               ~a:[ a_class [ "some padding ............................" ] ]
               [ txt "some text here"; txt ". and here" ];
           ];
       ])

let () =
  Format.printf "%a" (pp ~indent:true ()) content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant