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
add style to every line of decompiled contract #1822
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4404645
add style to every line of decompiled contract
ayrat555 326ea32
fix credo
ayrat555 718c141
fix line numbers
ayrat555 3d75d9e
Merge branch 'master' into ab-fix-decompiled-code-style
ayrat555 230e53e
Merge branch 'master' into ab-fix-decompiled-code-style
vbaranov 4659e70
Merge branch 'master' into ab-fix-decompiled-code-style
ayrat555 9a480f8
add CHANGELOG entry
ayrat555 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, I didn't find an example where
code
tag breaksspan
tag, that you are trying to solve here. Could you provide an example of a break in the decompiled code?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbaranov Here is generated HTML from view helper:
But it's rendered in the master branch as:
Above we can see that span tag is only on the first line.
This PR adds a span tag to every code tags if it's needed:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ayrat555 I opened this contract https://blockscout.com/eth/goerli/address/0x00bd9e214fab74d6fc21bf1af34261765f57e875/decompiled_contracts and I don't see any breaks. Point me please to the source where I can find breaks of
span
tag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbaranov for example, span tag only in the first comment line
Originally we closed it after
Let's make the world open source
from server. But browser left it only on the first line. Because out html is invalideThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbaranov you can try running blockscout on
goerli
and you will see that this PR highlights comments correctlyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok, I see now missing highlighting of some comment lines. Actually, I was trying to find breaks in
span
tag, but there are whole lines without neededspan
tag. Thanks for the clarification.