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

Provide an output setting to render all elements as block #273

Closed
jkowalczyk opened this issue Dec 14, 2012 · 6 comments
Closed

Provide an output setting to render all elements as block #273

jkowalczyk opened this issue Dec 14, 2012 · 6 comments

Comments

@jkowalczyk
Copy link
Contributor

If enable, the HTML output methods will consider all tags as block.
Example 1:

<a href="myLink.html"> <img alt="My image" src="myImage.jpg" /> </a>

would be rendered as follows

<a href="myLink.html"> 
  <img alt="My image" src="myImage.jpg" /> 
</a>

Example 2:

  <td colspan="2"><a title="link title" href="myLink.html">My Link title</a> anything else</td>

would be rendered as follows

  <td colspan="2">
    <a title="link title" href="myLink.html">My Link title</a>
    anything else
  </td>
jkowalczyk pushed a commit to jkowalczyk/jsoup that referenced this issue Dec 14, 2012
@jhy
Copy link
Owner

jhy commented Dec 14, 2012

Thanks Koj, this looks interesting. How would you describe the benefit of this -- why would someone want to use it?

@jkowalczyk
Copy link
Contributor Author

It enables to render the HTML as any inspector (firebug for instance) would do. Thus, it is easier to identify and highlight a unique node in the whole DOM.

@jhy
Copy link
Owner

jhy commented Dec 14, 2012

OK, cool. It'd be good if we can think of a method name that describes that utility better, I'm not sure that people will get it from "force block mode" -- that's more of an implementation detail. Maybe "outline" or something?

@jkowalczyk
Copy link
Contributor Author

Outline sounds great to me. Any chance to be merged in the next release ?

@jhy
Copy link
Owner

jhy commented Dec 17, 2012

Yep, I'll bring it in. Thanks!

@jhy
Copy link
Owner

jhy commented Jan 29, 2013

In 1.7.2

@jhy jhy closed this as completed Jan 29, 2013
zazi pushed a commit to dswarm/jsoup that referenced this issue Oct 15, 2015
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

No branches or pull requests

2 participants