Git Product home page Git Product logo

Comments (6)

jlblcc avatar jlblcc commented on August 27, 2024

Another option would be to add classes to the sections and use the white-space property in the CSS. I'm mainly concerned about preserving line-breaks, so white-space: pre-line; would fit my requirements and be the least intrusive option.

from mdtranslator.

stansmith907 avatar stansmith907 commented on August 27, 2024

That looks good. Another CSS property I had not known of. I'll work it
in. Create an issue for version 1.3?

On Fri, Jul 10, 2015 at 8:42 AM, Josh Bradley [email protected]
wrote:

Another option would be to add classes to the sections and use the
white-space https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
property in the CSS. I'm mainly concerned about preserving line-breaks, so white-space:
pre-line; would fit my requirements and be the least intrusive option.


Reply to this email directly or view it on GitHub
#37 (comment).

Stan Smith
Alaska Science Center
Data Manager
907-786-7072 Office
907-223-8752 Mobile
[email protected]

from mdtranslator.

jlblcc avatar jlblcc commented on August 27, 2024

I created a new branch and pull request, #38, with my solution. I only added the new .pre-line class to abstract section. Note that spaces and tabs will still collapse when using white-space: pre-line;.

Also, note the change to the ruby code. I refactored to use !tag instead of !text to prevent the extra newline. See jimweirich/builder#45. This will also need to be taken into consideration whenever .pre-line is applied.

from mdtranslator.

stansmith907 avatar stansmith907 commented on August 27, 2024

The white-space: pre-line; works for me.

Not sure what the advantage of moving the section tag into a tag! method
buys. It does create better formatted html than using text!, but there are
many places we still need to use the text! method. Any time we need to do
processing inside a tag or have multiple items to write within a tag, I
think we will still need the text! method. I think I prefer consistency
rather than cleaning up just some of the html. That said, the html is
already inconsistent.

On Fri, Jul 10, 2015 at 12:05 PM, Josh Bradley [email protected]
wrote:

I created a new branch and pull request, #38
#38, with my solution. I only
added the new .pre-line class to abstract section. Note that spaces and
tabs will still collapse when using white-space: pre-line;.

Also, note the change to the ruby code. I refactored to use !tag instead
of !text to prevent the extra newline. See jimweirich/builder#45
jimweirich/builder#45. This will also need to
be taken into consideration whenever .pre-line is applied.


Reply to this email directly or view it on GitHub
#37 (comment).

Stan Smith
Alaska Science Center
Data Manager
907-786-7072 Office
907-223-8752 Mobile
[email protected]

from mdtranslator.

jlblcc avatar jlblcc commented on August 27, 2024

The problem with using text! with .pre-line is the extra new-line that's added. Normally, this would be collapsed when rendered in the browser, but not when white-space: pre-line; is applied.

from mdtranslator.

jlblcc avatar jlblcc commented on August 27, 2024

Fixed by adae8c8

from mdtranslator.

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.