asciidoc embedded in haml

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

asciidoc embedded in haml

Emmanuel Bernard
In haml you can have elements in a specific markup

.news
  :markdown
    == Booyah 2.0
   
    Good news gents

I tried to do the same with :asciidoc(tor) but it was not recognized. I
know Asciidoc has first class support in Awestruct but here I'm looking
for embedded asciidoc.

From what I understand HAML uses Tilt which supports Asciidoc so I
expected it to work but it did not. I browsed the Awestruct code but
could not find the obvious place to register a new template for HAML via
Tilt.

Ideas?

Emmanuel

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

LightGuard
Administrator
Which version of haml and tilt? I know this works for slim. 

Sent from Mailbox for iPhone


On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]> wrote:

In haml you can have elements in a specific markup

.news
:markdown
== Booyah 2.0

Good news gents

I tried to do the same with :asciidoc(tor) but it was not recognized. I
know Asciidoc has first class support in Awestruct but here I'm looking
for embedded asciidoc.

From what I understand HAML uses Tilt which supports Asciidoc so I
expected it to work but it did not. I browsed the Awestruct code but
could not find the obvious place to register a new template for HAML via
Tilt.

Ideas?

Emmanuel

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

Emmanuel Bernard
tilt 1.4.1
haml 4.0.3

according to a Gemfile.lock grep

On Fri 2013-07-26  8:08, Jason Porter wrote:

> Which version of haml and tilt? I know this works for slim. 
> —
> Sent from Mailbox for iPhone
>
> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> wrote:
>
> > In haml you can have elements in a specific markup
> > .news
> >   :markdown
> >     == Booyah 2.0
> >    
> >     Good news gents
> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > know Asciidoc has first class support in Awestruct but here I'm looking
> > for embedded asciidoc.
> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > expected it to work but it did not. I browsed the Awestruct code but
> > could not find the obvious place to register a new template for HAML via
> > Tilt.
> > Ideas?
> > Emmanuel
> > ---------------------------------------------------------------------
> > Archives: http://talk-archive.awestruct.org/
> > To unsubscribe, e-mail: [hidden email]

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

LightGuard
Administrator
Surprising. Does it work if you add haml-contrib?

Sent from Mailbox for iPhone


On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]> wrote:

tilt 1.4.1
haml 4.0.3

according to a Gemfile.lock grep

On Fri 2013-07-26 8:08, Jason Porter wrote:


> Which version of haml and tilt? I know this works for slim. 
> —
> Sent from Mailbox for iPhone
>
> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> wrote:
>
> > In haml you can have elements in a specific markup
> > .news
> > :markdown
> > == Booyah 2.0
> >
> > Good news gents
> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > know Asciidoc has first class support in Awestruct but here I'm looking
> > for embedded asciidoc.
> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > expected it to work but it did not. I browsed the Awestruct code but
> > could not find the obvious place to register a new template for HAML via
> > Tilt.
> > Ideas?
> > Emmanuel
> > ---------------------------------------------------------------------
> > Archives: http://talk-archive.awestruct.org/
> > To unsubscribe, e-mail: [hidden email]

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

Emmanuel Bernard
Before I try, the name I need to use is :asciidoc right?

.news
  :asciidoc
    == Some title

    [source, java]
    ----
    public class Test {}
    ----

Emmanuel

On Fri 2013-07-26  8:49, Jason Porter wrote:

> Surprising. Does it work if you add haml-contrib?
> —
> Sent from Mailbox for iPhone
>
> On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> wrote:
>
> > tilt 1.4.1
> > haml 4.0.3
> > according to a Gemfile.lock grep
> > On Fri 2013-07-26  8:08, Jason Porter wrote:
> >> Which version of haml and tilt? I know this works for slim. 
> >> —
> >> Sent from Mailbox for iPhone
> >>
> >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> >> wrote:
> >>
> >> > In haml you can have elements in a specific markup
> >> > .news
> >> >   :markdown
> >> >     == Booyah 2.0
> >> >    
> >> >     Good news gents
> >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> >> > know Asciidoc has first class support in Awestruct but here I'm looking
> >> > for embedded asciidoc.
> >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> >> > expected it to work but it did not. I browsed the Awestruct code but
> >> > could not find the obvious place to register a new template for HAML via
> >> > Tilt.
> >> > Ideas?
> >> > Emmanuel
> >> > ---------------------------------------------------------------------
> >> > Archives: http://talk-archive.awestruct.org/
> >> > To unsubscribe, e-mail: [hidden email]
> > ---------------------------------------------------------------------
> > Archives: http://talk-archive.awestruct.org/
> > To unsubscribe, e-mail: [hidden email]

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

LightGuard
Administrator
Yes. 

Sent from Mailbox for iPhone


On Fri, Jul 26, 2013 at 9:59 AM, Emmanuel Bernard <[hidden email]> wrote:

Before I try, the name I need to use is :asciidoc right?

.news
:asciidoc
== Some title

[source, java]
----
public class Test {}
----

Emmanuel

On Fri 2013-07-26 8:49, Jason Porter wrote:


> Surprising. Does it work if you add haml-contrib?
> —
> Sent from Mailbox for iPhone
>
> On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> wrote:
>
> > tilt 1.4.1
> > haml 4.0.3
> > according to a Gemfile.lock grep
> > On Fri 2013-07-26 8:08, Jason Porter wrote:
> >> Which version of haml and tilt? I know this works for slim. 
> >> —
> >> Sent from Mailbox for iPhone
> >>
> >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> >> wrote:
> >>
> >> > In haml you can have elements in a specific markup
> >> > .news
> >> > :markdown
> >> > == Booyah 2.0
> >> >
> >> > Good news gents
> >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> >> > know Asciidoc has first class support in Awestruct but here I'm looking
> >> > for embedded asciidoc.
> >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> >> > expected it to work but it did not. I browsed the Awestruct code but
> >> > could not find the obvious place to register a new template for HAML via
> >> > Tilt.
> >> > Ideas?
> >> > Emmanuel
> >> > ---------------------------------------------------------------------
> >> > Archives: http://talk-archive.awestruct.org/
> >> > To unsubscribe, e-mail: [hidden email]
> > ---------------------------------------------------------------------
> > Archives: http://talk-archive.awestruct.org/
> > To unsubscribe, e-mail: [hidden email]

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

Emmanuel Bernard
In reply to this post by Emmanuel Bernard
Same error https://gist.github.com/emmanuelbernard/559835d488fea6249352


On Fri 2013-07-26 17:58, Emmanuel Bernard wrote:

> Before I try, the name I need to use is :asciidoc right?
>
> .news
>   :asciidoc
>     == Some title
>
>     [source, java]
>     ----
>     public class Test {}
>     ----
>
> Emmanuel
>
> On Fri 2013-07-26  8:49, Jason Porter wrote:
> > Surprising. Does it work if you add haml-contrib?
> > —
> > Sent from Mailbox for iPhone
> >
> > On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> > wrote:
> >
> > > tilt 1.4.1
> > > haml 4.0.3
> > > according to a Gemfile.lock grep
> > > On Fri 2013-07-26  8:08, Jason Porter wrote:
> > >> Which version of haml and tilt? I know this works for slim. 
> > >> —
> > >> Sent from Mailbox for iPhone
> > >>
> > >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> > >> wrote:
> > >>
> > >> > In haml you can have elements in a specific markup
> > >> > .news
> > >> >   :markdown
> > >> >     == Booyah 2.0
> > >> >    
> > >> >     Good news gents
> > >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > >> > know Asciidoc has first class support in Awestruct but here I'm looking
> > >> > for embedded asciidoc.
> > >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > >> > expected it to work but it did not. I browsed the Awestruct code but
> > >> > could not find the obvious place to register a new template for HAML via
> > >> > Tilt.
> > >> > Ideas?
> > >> > Emmanuel
> > >> > ---------------------------------------------------------------------
> > >> > Archives: http://talk-archive.awestruct.org/
> > >> > To unsubscribe, e-mail: [hidden email]
> > > ---------------------------------------------------------------------
> > > Archives: http://talk-archive.awestruct.org/
> > > To unsubscribe, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> Archives: http://talk-archive.awestruct.org/
> To unsubscribe, e-mail: [hidden email]
>

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

LightGuard
Administrator
Sorry, I guess it isn't in there. You'd have to write and register your own filter. Another possibility is to switch the slim. 

Sent from Mailbox for iPhone


On Sat, Jul 27, 2013 at 10:04 PM, Emmanuel Bernard <[hidden email]> wrote:

Same error https://gist.github.com/emmanuelbernard/559835d488fea6249352


On Fri 2013-07-26 17:58, Emmanuel Bernard wrote:


> Before I try, the name I need to use is :asciidoc right?
>
> .news
> :asciidoc
> == Some title
>
> [source, java]
> ----
> public class Test {}
> ----
>
> Emmanuel
>
> On Fri 2013-07-26 8:49, Jason Porter wrote:
> > Surprising. Does it work if you add haml-contrib?
> > —
> > Sent from Mailbox for iPhone
> >
> > On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> > wrote:
> >
> > > tilt 1.4.1
> > > haml 4.0.3
> > > according to a Gemfile.lock grep
> > > On Fri 2013-07-26 8:08, Jason Porter wrote:
> > >> Which version of haml and tilt? I know this works for slim. 
> > >> —
> > >> Sent from Mailbox for iPhone
> > >>
> > >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> > >> wrote:
> > >>
> > >> > In haml you can have elements in a specific markup
> > >> > .news
> > >> > :markdown
> > >> > == Booyah 2.0
> > >> >
> > >> > Good news gents
> > >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > >> > know Asciidoc has first class support in Awestruct but here I'm looking
> > >> > for embedded asciidoc.
> > >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > >> > expected it to work but it did not. I browsed the Awestruct code but
> > >> > could not find the obvious place to register a new template for HAML via
> > >> > Tilt.
> > >> > Ideas?
> > >> > Emmanuel
> > >> > ---------------------------------------------------------------------
> > >> > Archives: http://talk-archive.awestruct.org/
> > >> > To unsubscribe, e-mail: [hidden email]
> > > ---------------------------------------------------------------------
> > > Archives: http://talk-archive.awestruct.org/
> > > To unsubscribe, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> Archives: http://talk-archive.awestruct.org/
> To unsubscribe, e-mail: [hidden email]
>

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

mojavelinux
In reply to this post by Emmanuel Bernard
I submitted filters for both Slim and Haml a while back. Slim accepted the pull request right away. Haml rejected it because they wanted it to be added to haml-contrib instead of the main haml gem. I challenged the rejection, then got frustrated and lost interest when I received no response.

Haml has since made the move to deprecate Markdown and Textile support in the main Haml gem, which satisfies my objection that they have priority. Today I submitted a pull request to haml-contrib to add the AsciiDoc filter.


Once this is accepted and released, you'll be able to add AsciiDoc content in one of two ways:

Block:

asciidoc:
  *booyah* back at ya!

which renders:

<div class="paragraph">
<p><strong>booyah</strong> back at ya!</p>
</div>

Inline:

asciidoc:
  :doctype: inline
  *booyah* back at ya!

which renders:

<strong>booyah</strong> back at ya!

If you have suggestions, feel free to submit them to haml-contrib and mention them here or in the Asciidoctor issue tracker (to track the upstream issue).

Enjoy!

-Dan


On Fri, Jul 26, 2013 at 10:04 AM, Emmanuel Bernard <[hidden email]> wrote:
Same error https://gist.github.com/emmanuelbernard/559835d488fea6249352


On Fri 2013-07-26 17:58, Emmanuel Bernard wrote:
> Before I try, the name I need to use is :asciidoc right?
>
> .news
>   :asciidoc
>     == Some title
>
>     [source, java]
>     ----
>     public class Test {}
>     ----
>
> Emmanuel
>
> On Fri 2013-07-26  8:49, Jason Porter wrote:
> > Surprising. Does it work if you add haml-contrib?
> > —
> > Sent from Mailbox for iPhone
> >
> > On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> > wrote:
> >
> > > tilt 1.4.1
> > > haml 4.0.3
> > > according to a Gemfile.lock grep
> > > On Fri 2013-07-26  8:08, Jason Porter wrote:
> > >> Which version of haml and tilt? I know this works for slim. 
> > >> —
> > >> Sent from Mailbox for iPhone
> > >>
> > >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> > >> wrote:
> > >>
> > >> > In haml you can have elements in a specific markup
> > >> > .news
> > >> >   :markdown
> > >> >     == Booyah 2.0
> > >> >
> > >> >     Good news gents
> > >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > >> > know Asciidoc has first class support in Awestruct but here I'm looking
> > >> > for embedded asciidoc.
> > >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > >> > expected it to work but it did not. I browsed the Awestruct code but
> > >> > could not find the obvious place to register a new template for HAML via
> > >> > Tilt.
> > >> > Ideas?
> > >> > Emmanuel
> > >> > ---------------------------------------------------------------------
> > >> > Archives: http://talk-archive.awestruct.org/
> > >> > To unsubscribe, e-mail: [hidden email]
> > > ---------------------------------------------------------------------
> > > Archives: http://talk-archive.awestruct.org/
> > > To unsubscribe, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> Archives: http://talk-archive.awestruct.org/
> To unsubscribe, e-mail: [hidden email]
>

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]




--
Reply | Threaded
Open this post in threaded view
|

Re: asciidoc embedded in haml

mojavelinux
Btw, we should update Awestruct to depend on the haml-contrib gem, since Haml is only half-installed without it. It's a small gem that has no other dependencies...it's just a bridge to Tilt.

-Dan


On Sun, Jul 28, 2013 at 8:04 PM, Dan Allen <[hidden email]> wrote:
I submitted filters for both Slim and Haml a while back. Slim accepted the pull request right away. Haml rejected it because they wanted it to be added to haml-contrib instead of the main haml gem. I challenged the rejection, then got frustrated and lost interest when I received no response.

Haml has since made the move to deprecate Markdown and Textile support in the main Haml gem, which satisfies my objection that they have priority. Today I submitted a pull request to haml-contrib to add the AsciiDoc filter.


Once this is accepted and released, you'll be able to add AsciiDoc content in one of two ways:

Block:

asciidoc:
  *booyah* back at ya!

which renders:

<div class="paragraph">
<p><strong>booyah</strong> back at ya!</p>
</div>

Inline:

asciidoc:
  :doctype: inline
  *booyah* back at ya!

which renders:

<strong>booyah</strong> back at ya!

If you have suggestions, feel free to submit them to haml-contrib and mention them here or in the Asciidoctor issue tracker (to track the upstream issue).

Enjoy!

-Dan


On Fri, Jul 26, 2013 at 10:04 AM, Emmanuel Bernard <[hidden email]> wrote:
Same error https://gist.github.com/emmanuelbernard/559835d488fea6249352


On Fri 2013-07-26 17:58, Emmanuel Bernard wrote:
> Before I try, the name I need to use is :asciidoc right?
>
> .news
>   :asciidoc
>     == Some title
>
>     [source, java]
>     ----
>     public class Test {}
>     ----
>
> Emmanuel
>
> On Fri 2013-07-26  8:49, Jason Porter wrote:
> > Surprising. Does it work if you add haml-contrib?
> > —
> > Sent from Mailbox for iPhone
> >
> > On Fri, Jul 26, 2013 at 9:39 AM, Emmanuel Bernard <[hidden email]>
> > wrote:
> >
> > > tilt 1.4.1
> > > haml 4.0.3
> > > according to a Gemfile.lock grep
> > > On Fri 2013-07-26  8:08, Jason Porter wrote:
> > >> Which version of haml and tilt? I know this works for slim. 
> > >> —
> > >> Sent from Mailbox for iPhone
> > >>
> > >> On Fri, Jul 26, 2013 at 1:25 AM, Emmanuel Bernard <[hidden email]>
> > >> wrote:
> > >>
> > >> > In haml you can have elements in a specific markup
> > >> > .news
> > >> >   :markdown
> > >> >     == Booyah 2.0
> > >> >
> > >> >     Good news gents
> > >> > I tried to do the same with :asciidoc(tor) but it was not recognized. I
> > >> > know Asciidoc has first class support in Awestruct but here I'm looking
> > >> > for embedded asciidoc.
> > >> > From what I understand HAML uses Tilt which supports Asciidoc so I
> > >> > expected it to work but it did not. I browsed the Awestruct code but
> > >> > could not find the obvious place to register a new template for HAML via
> > >> > Tilt.
> > >> > Ideas?
> > >> > Emmanuel
> > >> > ---------------------------------------------------------------------
> > >> > Archives: http://talk-archive.awestruct.org/
> > >> > To unsubscribe, e-mail: [hidden email]
> > > ---------------------------------------------------------------------
> > > Archives: http://talk-archive.awestruct.org/
> > > To unsubscribe, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> Archives: http://talk-archive.awestruct.org/
> To unsubscribe, e-mail: [hidden email]
>

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]




--



--