Code Monkey home page Code Monkey logo

Comments (3)

evgeniy-khatko avatar evgeniy-khatko commented on May 12, 2024

Could you please look into this?

from odf-report.

sandrods avatar sandrods commented on May 12, 2024

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.

yokem55 avatar yokem55 commented on May 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.