asciidoctor / docgist

Render AsciiDoc documents from Gists, GitHub, DropBox and other remote sources in the browser.
http://gist.asciidoctor.org
57 stars 76 forks source link

Upgrade to Asciidoctor.js 1.5.3 #21

Open ggrossetie opened 9 years ago

ggrossetie commented 9 years ago

Could you please test that everything is working fine with version 1.5.3-preview.2 ? If this is the case I will release a final version.

Thanks :smile:

mojavelinux commented 9 years ago

To clarify, the version is 1.5.3-preview.2 (notice the hyphen). https://www.npmjs.com/package/asciidoctor.js

nawroth commented 9 years ago

I'm on it.

nawroth commented 9 years ago

There seems to be a difference in how attributes are handled. At least that's my guess because:

@Mogztter

mojavelinux commented 9 years ago

Yep, I raised this point in another issue. We need a hack in the build that removes an obsolete hack for Opal. Attributes passed as a string aren't getting split correctly.

nawroth commented 9 years ago

Plese update here when there's a fix.

ggrossetie commented 9 years ago

Just released a 1.5.3-preview.3. This version should :zap: this :bug:

mojavelinux commented 9 years ago

Nice!

nawroth commented 9 years ago

The dist folder wasn't updated!

mojavelinux commented 9 years ago

That's definitely something we should automate.

ggrossetie commented 9 years ago

Damn! Yes manual releases are prone to error... we should definitely automate the process! Automate all the things!!! Le 8 nov. 2015 1:01 PM, "Dan Allen" notifications@github.com a écrit :

That's definitely something we should automate.

— Reply to this email directly or view it on GitHub https://github.com/asciidoctor/docgist/issues/21#issuecomment-154814443.

ggrossetie commented 9 years ago

1.5.3-preview.4 is out!

nawroth commented 9 years ago

I'm still seeing the same issue. You can try it out at http://nawroth.github.io/docgist/

ggrossetie commented 9 years ago

@nawroth With Opal 0.8.0 doc.attributes.map is empty (for an unknown reason) and you must use doc.attributes.smap instead. Or you can use doc.$attrs('name') to stay out of Opal's "internal".

nawroth commented 9 years ago

doc.attributes.smap works. One difference I noticed is that running with parse_header_only=true will only return attributes that are actually in the document header, while it previously didn't mind a blank line between title and document attributes.

So I fixed the examples to work with it, for example:

ggrossetie commented 9 years ago

One difference I noticed is that running with parse_header_only=true will only return attributes that are actually in the document header, while it previously didn't mind a blank line between title and document attributes.

I think this is related to https://github.com/asciidoctor/asciidoctor.js/issues/95#issuecomment-68576350

doc.attributes.smap works.

Yes but you should use Hash's public methods instead: https://github.com/opal/opal/blob/master/opal/corelib/hash.rb

smap is an internal property and Opal can decide to modify it or remove it in future version :disappointed:

nawroth commented 9 years ago

@Mogztter I'll fix that, thanks for the links. The more important point is that 1.5.3 seems to work fine with DocGist now. :+1:

ggrossetie commented 9 years ago

Yeah, thanks for your great work :smiley:

nawroth commented 9 years ago

Updated it to use $has_key? and $fetch.

Are there any unresolved issues with the previews or will 1.5.3 be out soon?

ggrossetie commented 9 years ago

We're still discussing an "issue" on attributes here and here but I think the behavior is the same in Asciidoctor core (Ruby) and Asciidoctor.js... Hopefully @mojavelinux will clear up our questions and give us the green light to proceed.

So 1.5.3 should be out pretty soon!

nawroth commented 9 years ago

I couldn't find any more problems, so I pushed my changes + a lot around syntax highlighting to http://gist.asciidoctor.org/

Will do another update if there are any changes in the final 1.5.3.

mojavelinux commented 9 years ago

it previously didn't mind a blank line between title and document attributes.

We should be strict about not permitting blank lines in the header, IMO.

nawroth commented 9 years ago

@mojavelinux Agreed.

mojavelinux commented 9 years ago

That's great news that you got it all working. Obviously, we still need to improve the usability of the APIs around document-level attributes and locking attributes, but that's for 1.6.0. What's important is that we have some really nice (and clear) use cases to study now. As far as 1.5.3 is concerned, if we understand how to work with what is there, then we are ready for release.

ggrossetie commented 5 years ago

Or better upgrade to https://github.com/asciidoctor/asciidoctor.js/releases/tag/v1.5.9