Skip to content

Conversation

@tamdaz
Copy link
Contributor

@tamdaz tamdaz commented Feb 5, 2025

Context

This bug is due to the number of backslashes in the message content; as a result, the block has not colored the exact block size for the first and the last line. The solution is to remove these antislashes.

lines.each do |line|
  messages << %(#{line}#{" " * (len - line.gsub('\\', nil).size)})
end

Thanks to #gsub method, the block is formated correctly.

image

Changelog

  • Fix incorrectly aligned block

Fixes #202


Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

@tamdaz tamdaz marked this pull request as ready for review February 5, 2025 23:14
@Blacksmoke16 Blacksmoke16 added kind:bug An existing feature isn't working as expected component:console labels Feb 5, 2025
@codecov
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Flag Coverage Δ
compiled 18.55% <0.00%> (ø)
unit 96.62% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
clock 100.00% <ø> (ø)
console 97.09% <100.00%> (ø)
dependency_injection 97.89% <ø> (ø)
dotenv 98.58% <ø> (ø)
event_dispatcher 95.46% <ø> (ø)
framework 98.13% <ø> (ø)
image_size 96.63% <ø> (ø)
mercure 94.95% <ø> (ø)
mime 98.56% <ø> (ø)
negotiation 97.94% <ø> (ø)
routing 98.39% <ø> (ø)
serializer 96.51% <ø> (ø)
spec 96.40% <ø> (ø)
validator 95.87% <ø> (ø)

📢 Thoughts on this report? Let us know!

Co-authored-by: George Dietrich <github@dietrich.house>
@Blacksmoke16 Blacksmoke16 merged commit 82b0e20 into athena-framework:master Feb 6, 2025
14 checks passed
PallasAthenaie pushed a commit to athena-framework/console that referenced this pull request Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:console kind:bug An existing feature isn't working as expected

Development

Successfully merging this pull request may close these issues.

Incorrectly aligned block

2 participants