Skip to content

Remove empty lines from html #139

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

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

benoittgt
Copy link
Member

@benoittgt benoittgt commented Apr 5, 2020

Rdoc/Erb generate a lot of extra empty lines. After a discussion #136 (review) and few try in RDoc and Erb the easiest solution at the moment is to remove line by ourself.

Dependent of #138

@pirj
Copy link
Member

pirj commented Apr 5, 2020

−646,764 

image

👍

How do you remove it, did you update rspec-dev scripts?

@pirj
Copy link
Member

pirj commented Apr 5, 2020

Is this only needed for 2.14 and 2.99?

@JonRowe
Copy link
Member

JonRowe commented Apr 7, 2020

So this is mostly new line removals (I had to diff manually and grep) but also adds some div closing tags and I'm not sure why.

@benoittgt
Copy link
Member Author

benoittgt commented Apr 7, 2020

Sorry for the big commit. Feel free to make any remarks of my work. I am also here to constantly improve myself. Advices and suggestions are always welcome. 😊

It should have added commands to show additions and deletions in PR body.

Here is the diff without empty lines and "Generated on..." timestamp

$ git diff -U0 HEAD\~1..HEAD | \
  grep -v '^@@ ' | \
  grep -v '^-[[:blank:]]*$' | \
  grep -B1 -E '^(-[^-]|\+[^+])[^  Generated on]'
+++ b/source/documentation/3.0/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.1/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.2/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.2/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.3/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.3/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.4/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.4/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.5/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.5/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.6/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.6/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.7/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.7/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.8/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.8/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.9/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.9/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>

So div are only moved.

@benoittgt benoittgt marked this pull request as ready for review April 7, 2020 15:19
@benoittgt
Copy link
Member Author

benoittgt commented Apr 7, 2020

Is this only needed for 2.14 and 2.99?

It is needed for every version.

@JonRowe
Copy link
Member

JonRowe commented Apr 7, 2020

Oh its removing some spacing after the tags? Thats ok then.

@benoittgt
Copy link
Member Author

Yep @JonRowe :)

Capture d’écran 2020-04-07 à 17 18 39

@JonRowe
Copy link
Member

JonRowe commented Apr 7, 2020

I'd suggest not merging until #138 is merged, then merge this into source, because it makes diffing 138 way more difficult.

@benoittgt
Copy link
Member Author

No problem Jon

@benoittgt benoittgt force-pushed the no-plugin-no-bash-command-from-source branch from cd21fc5 to 201731d Compare April 8, 2020 21:01
@benoittgt benoittgt changed the base branch from no-plugin-from-source to source April 8, 2020 21:02
@benoittgt
Copy link
Member Author

The last change remove only blank lines:

$ git diff -U0 HEAD\~1..HEAD | \                                                                           
  grep -v '^@@ ' | \
  grep -v '^-[[:blank:]]*$' | \
  grep -B1 -E '^(-[^-]|\+[^+])[^  Generated on]'
+++ b/source/documentation/3.0/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.1/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.2/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.2/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.3/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.3/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.4/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.4/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.5/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.5/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.6/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.6/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.7/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.7/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.8/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.8/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>
--
+++ b/source/documentation/3.9/rspec-core/RSpec/Core/Notifications/ExamplesNotification.html
-</div>
+</div>
--
+++ b/source/documentation/3.9/rspec-core/RSpec/Core/Runner.html
-</div>
+</div>

@benoittgt benoittgt merged commit adb6c90 into source Apr 8, 2020
@benoittgt benoittgt deleted the no-plugin-no-bash-command-from-source branch April 8, 2020 21:03
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.

3 participants