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

Improperly formatting text within a <pre> tag #1776

Closed
bradleylarrick opened this issue May 17, 2022 · 3 comments
Closed

Improperly formatting text within a <pre> tag #1776

bradleylarrick opened this issue May 17, 2022 · 3 comments
Assignees
Labels
bug Confirmed bug that we should fix fixed
Milestone

Comments

@bradleylarrick
Copy link

bradleylarrick commented May 17, 2022

The latest version is improperly formatting text that includes embedded tags within a <pre> tag. The attached test case works in version 1.14.3, but fails in version 1.15.1.

jsoupExample.zip

@jhy
Copy link
Owner

jhy commented May 17, 2022

Specifically, in this example <span> child elements of the <pre> are not inheriting the pre-formatted bit, when pretty-printing is on. See it for e.g. here: https://try.jsoup.org/~gHc-whISlJdG_Ehr-6NPEoq552k

@bradleylarrick the workaround for now will be to disable pretty printing.

This looks to have regressed when we were making pretty print more consistent on new line removal.

@jhy jhy added this to the 1.15.2 milestone May 17, 2022
@jhy jhy self-assigned this May 17, 2022
@jhy jhy added the bug Confirmed bug that we should fix label May 17, 2022
@jhy jhy closed this as completed in f6d9aa0 May 18, 2022
@jhy
Copy link
Owner

jhy commented May 18, 2022

Fixed - regression caused by f4d00c2

@jhy
Copy link
Owner

jhy commented May 18, 2022

(And I confirmed that the testcase supplied by Brad now passes.)

@jhy jhy added the fixed label May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug that we should fix fixed
Projects
None yet
Development

No branches or pull requests

2 participants