Comments (3)
Could you please look into this?
from odf-report.
Sorry for the delay, I could not find time to take a look at it before.
Well, that's a problem I'm not sure I know how to handle. I've looked into the generated XML and the spaces are there, but they dont show up in the doc.
It happens that when you manually insert spaces between words, a special tag is inserted, like
<text:s text:c="5"/>
I can't think of a way to safely interpret white-spaces and generate this tags accordingly.
I would gladly accept a pull request to do so, though.
Sandro
from odf-report.
If anyone is still looking at this - here is a way to replace strings of more than one consecutive space with a the odf consecutive space tag:
irb(main):111:0> 'string with lots of weird spacing'.gsub(/ {2,}/){|r| '<text:s text:c=' + r.count(" ").to_s + '/>'}
=> "string<text:s text:c=4/>with<text:s text:c=3/>lots of weird<text:s text:c=9/>spacing"
I'm guessing this could be put in lib/odf-report/field.rb as a new function along with the sanitize function.
from odf-report.
Related Issues (20)
- optional image HOT 3
- Combine documents HOT 1
- odf files that generated by odf-report v0.7.0 be recognized as "broken file" in Microsoft Word HOT 3
- Subtotals HOT 1
- Word found unreadable content in "report.odt" (and workaround) HOT 8
- Insert line break inside placeholder HOT 1
- How update table of contents index of a stored template? v0.7.2 HOT 1
- Nokogiri related memory not freed when `inner_html=` is called HOT 4
- Feature request: Delete table if it has no rows HOT 1
- Nokogiri::CSS::SyntaxError: unexpected '|' after '#<Nokogiri::CSS::Node:0x000000012ae10458>' HOT 8
- example of including conditional content in a document? HOT 2
- Example for some simple html-formatting HOT 5
- `add_image' for a section is not available
- Open file instead of downloading it HOT 1
- Please upgrade rubyzip HOT 3
- All mock-images replaced by one (same) image? HOT 2
- Preserve html formatting HOT 1
- Error "no implicit conversion of nil into String (TypeError)" from report.generate HOT 1
- Placeholders inside table are not replaced HOT 3
- Rubyzip 1.3 or 2.0 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 odf-report.