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

Simple solution to issue #3413 Removing inserted blank lines from pagnated output #3414

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Changed

### Fixed

- powerconnect: Remove undesirable inserted blank lines during pagination. Fixes #3413 (@clifcox)

## [0.32.0 – 2025-02-17]
This release fixes a security issue in oxidized-web, which is included in the
Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/model/powerconnect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class PowerConnect < Oxidized::Model

comment '! '

expect /^\s*--More--\s+.*$/ do |data, re|
expect /\n\s*--More--\s+.*/ do |data, re| # Also grab the blank line above the --More--
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove the End of Line ($) at the end of the match?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Howdy,

good question. :-) Though I'm not an expert but it seems redundant, because without a /m modifier, the '.' does not match '\n' and '.*' is greedy so it will grab all up to the next '\n' anyway, so it's the same? We could put it back in if you like. :-)

Clif

send ' '
data.sub re, ''
end
Expand Down