Comments (7)
lxml seems to be calling the C code in here https://github.com/ConradIrwin/libxml2/blob/master/HTMLtree.c
Doesn't seem like an easy fix which seems crazy given how common an indent_spaces
type param is for pretty printing functionality
from exalt.
Sorry for the late reply.
I addressed this issue in #1 (comment).
from exalt.
I would like to leave this ticket open - it's really like sand in shoes having tabs as 2 spaces :) I'll pursue solution from within lxml.
from exalt.
Sure thing! If you find anything, please let me know and I'll definitely see about implementing it.
There was a post on Hacker News a couple a days ago about a single-file Python XML formatter that might be serve as alternative solution. I'll see if I can find it.
from exalt.
Maybe this http://effbot.org/zone/element-lib.htm#prettyprint? Even lxml mentions this element library.
I have to admit that I'm Python noob so I'm not sure how usable this might be for you.
from exalt.
The thing is that other than defining the indent width, lxml
's pretty-printer works really well. Most other pretty-printers seem to rely on regular expressions and fall apart pretty quickly. That's why it's not necessarily very easy to find a replacement for lxml
.
from exalt.
Yep, the situation is really perplexing. I guess I have to live with it and do some post find/replace myself :|
from exalt.
Related Issues (20)
- Auto-Completion based on scheme. HOT 2
- After fixing errors validator still shows error HOT 13
- Entities in external DTD are neglected HOT 4
- undefined symbol: PyExc_ImportError HOT 1
- Validating Magento 2 XML files HOT 5
- some info about catalogs HOT 2
- Ignore multiple schemaLocation HOT 10
- Canonical xml using Exalt HOT 6
- Validation error disappears from screen HOT 4
- failed to located the main schema HOT 12
- `exalt_format` raises errors in console when used in non-xml files HOT 1
- Default keybindings can interfere with AltGr bindings in regional keyboard layouts HOT 1
- [Bug] Can not begin to use issue HOT 2
- Exalt is silent, when schematypens is missing from xml-model PI HOT 6
- [Bug] exalt_format_selections delete lines. HOT 3
- [Bug] TypeError: 'NoneType' object is not iterable HOT 6
- add instruction to restart sublime after install HOT 1
- External DTD Validation not working HOT 6
- Shows error for CDATA entries HOT 1
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 exalt.