Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non-major mobiledoc versions? #11

Open
rsoo opened this issue May 30, 2017 · 0 comments
Open

Support for non-major mobiledoc versions? #11

rsoo opened this issue May 30, 2017 · 0 comments

Comments

@rsoo
Copy link

rsoo commented May 30, 2017

Hey, thanks for your work on this!

Was wondering why there's only support for MOBILEDOC_VERSION 0.2.0 and 0.3.0?

# lib/mobiledoc_html_renderer.rb

def render(mobiledoc)
  version = mobiledoc['version']

  case version
  when '0.2.0', nil
    Renderer_0_2.new(mobiledoc, state).render
  when '0.3.0', nil
    Renderer_0_3.new(mobiledoc, state).render
  else
    raise Mobiledoc::Error.new(%Q[Unexpected Mobiledoc version "#{version}"])
  end
end

My use case involves Mobiledoc version 0.3.1 and I had to comment out the error and explicitly call the Renderer for 0.3.0

Curious -- what was the reasoning behind this? Would you like for me to open a PR to match any valid Mobiledoc version? (#12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant