Skip to content

Website dream-html converter adds empty comments and txt #45

@MarcCoquand

Description

@MarcCoquand

Heya!

I gave the dream-html converter a try on the website with the following:

<html lang="en"><head>
    <title>Testing pure-html</title>
  </head>
  <body>
    <h1>Hello world!</h1>
    <p>This is coming from ocaml!</p>
</body></html>

And it generated:

html [lang "en"; ] [
head [] [
comment "**";
title [] "Testing pure-html";
comment "**";];
comment "**";
body [] [
txt "
    ";
h1 [] [
txt "Hello world!";];
txt "
    ";
p [] [
txt "This is coming from ocaml!";];
txt "
";];]

It seems the converter adds comments as well as txt "" elements where there shouldn't be any.

I think something like this should have been generated instead:

html [lang "en"; ] [
head [] [
title [] "Testing pure-html";];
body [] [
h1 [] [
txt "Hello world!";];
p [] [
txt "This is coming from ocaml!";];];]

Stripping away the unnecessary comments and texts.

I tested this on Linux with Firefox and Chromium

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions