Code Monkey home page Code Monkey logo

formatize's Issues

Rails 3.0.0.rc

Bundler complains that formatize requires actionpack=3.0.0.beta4. I imagine there's no incompatibility with Rails 3.0.0.rc, so I think you just need to update the gemspec file :)

textilize_without_paragraph escaping text

textilize_without_paragraph returns escaped text.

Perhaps the following code will render text consistent with the textilize method:

def textilize_without_paragraph(text, *flags)
      textiled = textilize(text, *flags)
      if textiled[0..2] == "<p>" then textiled = textiled[3..-1] end
      if textiled[-4..-1] == "</p>" then textiled = textiled[0..-5] end
      return textiled.html_safe
end

ABANDONED

I'm sorry, but this project is no longer active. Feel free to fork the repo, copy the code, release the code under a different gem or whatever you need.

HTML5 elements in Markdown?

I am really enjoying this gem, it's a very neat and tidy way to get the Markdown formatter back in Rails 3. I wonder if there is any way to handle HTML5 elements in Markdown? I tried adding some raw HTML within a Markdown element, and while I was able to use a div, I couldn't use an aside as a container. Same text to render in both cases, but the aside was simply stripped out altogether, and only its contents displayed in the output.

Any thoughts about this? Is there a whitelist of element names that I could edit somewhere?

Thanks in advance,

Walter

Rails 3.0.0.rc2

Same again :) Formatize depends on actionpack 3.0.0.rc, so bundler won't let me use formatize if I upgrade to RC2.

html_safe being called when it shouldn't

A snippet from textilize method, note that html_safe is being called on the return value of the if block. Which means it will be called even if "" is returned, which is unnecessary.

  if text.blank?
    ""
  else
    textilized = RedCloth.new(text, options)
    textilized.to_html
  end.html_safe

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.