Skip to content

Fix 662#822

Merged
Martin1887 merged 6 commits intomasterfrom
fix-662
Jan 30, 2024
Merged

Fix 662#822
Martin1887 merged 6 commits intomasterfrom
fix-662

Conversation

@Martin1887
Copy link
Collaborator

Fixes #662

@Martin1887
Copy link
Collaborator Author

I think this pull request also allows moving your tests of html.rs to regression.txt after removing the trim() from the standardization function, @notriddle.

@Martin1887 Martin1887 requested a review from mgeisler January 27, 2024 09:34
@Martin1887
Copy link
Collaborator Author

Please review the pull request to merge it, @notriddle, @mgeisler. Thanks!

@notriddle
Copy link
Collaborator

This one passes.

```````````````````````````````` example
*
→ <div>
→ <div>
.
<ul>
<li>   <div>
   <div>
</li>
</ul>
````````````````````````````````

This one doesn't pass. There's an extra space before the first div. The dingus puts two spaces before both divs.

```````````````````````````````` example
*
→<div>
→<div>
.
<ul>
<li>  <div>
  <div>
</li>
</ul>
````````````````````````````````

@Martin1887
Copy link
Collaborator Author

The maximum between indent and remaining space does the trick.

Copy link
Collaborator

@notriddle notriddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches every case I can think of looking for by hand.

@Martin1887 Martin1887 merged commit f698256 into master Jan 30, 2024
@Martin1887 Martin1887 deleted the fix-662 branch January 30, 2024 16:57
@mgeisler
Copy link
Collaborator

mgeisler commented Feb 6, 2024

Thanks a lot, @Martin1887 and @notriddle!

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

Successfully merging this pull request may close these issues.

HTML block loses initial indentation

3 participants