Comments (3)
Have you tested this and does it actually work? If so, can you please let me know exactly what config options you have set? Because even when I use "--wrap-attributes no", it still wraps all attributes. And even if I set "wrappable = no" in line 1163, it still wraps all attributes. And if I put an 'fprintf(stderr, "value: %s\n", attr->value);' at line 1128, I can see that the attribute value has already been wrapped before it was passed to the PPrintAttribute function.
Anyway, I agree that tidy should not be wrapping title attributes. But as far as I can see, making this code change is not going to have any affect. There must be something I'm missing here.
from tidy-html5.
So after walking through the code, I find ParseValue in the lexer and see that is has munge=yes but that can be overridden y TidyLiteralAttribs, which is set by the --literal-attributes config option. So I guess you must have the option set too. Because if you don't have that set, the lexer code is always going to "munge" attribute values long before the pretty-printing code is executed, regardless of whatever options you have set.
But now I find that if I do "tidy --literal-attributes yes --wrap-attributes yes", no attribute values get wrapped, ever. So it's still not clear to me what's going on here.
So It would be really helpful to know exactly which options you have set.
from tidy-html5.
OK, looking at the docs finally I understand the logic and what --wrap-attributes does. It only wraps attribute values in cases where the value makes the line length longer than the value of the "wrap" option. So anyway, I agree it should not be doing that for the value of the title attribute, so I'll go ahead and make this change.
from tidy-html5.
Related Issues (20)
- tidy 5.8.0 reports version as 5.7.45 HOT 1
- Request.info
- Misleading warning for minlength attributes on input elements
- tidy-html5 Build failure on arm64-uwp
- "This document has errors" message gets "stuck" after hitting first error, when scanning multiple files
- nowrap and width attributes in <td> tag
- Stack-overflow on tidy-html5-5.8.0 HOT 2
- accessibility-check disables tidy-mark
- option "--indent-with-tabs yes" does NOT work as expected HOT 1
- can -i be performed without adding elements?
- Document --tidy-mark flag in tidy --help HOT 2
- Your website - Use HTML tidy perhaps? HOT 2
- embedded javascript is not being indented, nor is existing indentation preserved
- Display of options in help is not handling multibyte characters
- Always direct the user to the line where the crime occurred
- Warn about empty tags
- Say instead "`<` seen twice"
- 放送部ファイル
- مرحبا
- Hi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidy-html5.