Code Monkey home page Code Monkey logo

Comments (7)

lordofthejars avatar lordofthejars commented on July 28, 2024

mm yes maybe it is what you are pointing out here, I am pretty sure that Gradle has nothing to do about this problem. Let me write a unit test and and try to find a solution. Thank you very much for opening the issue and of course using Asciidoctor.

from asciidoctorj.

lordofthejars avatar lordofthejars commented on July 28, 2024

Working on this, you will be keep updated 😆

from asciidoctorj.

lordofthejars avatar lordofthejars commented on July 28, 2024

Could you provide your asciidoc document where copycss is set? I cannot reproduce in my computer.

from asciidoctorj.

lordofthejars avatar lordofthejars commented on July 28, 2024

Reproduced, do not worry ;)

from asciidoctorj.

lordofthejars avatar lordofthejars commented on July 28, 2024

Reproduced and you are right with your analysis of the problem. I have opened a discussion about how to fix it: discussion

from asciidoctorj.

mojavelinux avatar mojavelinux commented on July 28, 2024

After giving it some more thought, I realized there is a third solution. I can put the default CSS into a constant in a Ruby file, then load that Ruby file using require when it is needed and read the value off the constant.

...which brings up another data point when looking into this issue. Somewhere in JRuby (I think in JRubyKernel.java), JRuby is able to read files out of the classpath for the require statement. Thus, there must be some way in Ruby to read the file contents from a file on the LOAD_PATH without evaluating it. Maybe Kernel#open?

from asciidoctorj.

lordofthejars avatar lordofthejars commented on July 28, 2024

Ok, then one idea that I was discarding at first (implementing copycss feature inside java). it seems that would be the best one. I agree that the best way would be trying to read the file from the gem with a method (Kernel#open) could be an option if works. But it comes to my mind one thing:

If we add a specific behaviour in one attribute, maybe in future we will add another one, and another one, ... and we can finish by having some logic duplicated in Java and Ruby part. I think this would not be the case, but opens the door to do it again.

Of course I think third option could be the best one, but I don't like this duplication.

from asciidoctorj.

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.