Hey there!

Consider the following Markdown:

::: title
Novel Name
:::

::: author
Author Name
:::

This is run through some code that produces the following TeX code:

\startbooktitle

Novel Name

\stopbooktitle

\startbookauthor

Author Name

\stopbookauthor


When typeset, this produces:

\par Novel Name \par
\par Author Name \par

However, there were no line breaks in the original div element, so it was a bit of a surprise to see the blank lines in the output.

Is there a way to suppress the internal newlines to generate the blocks without the new lines? Such as:

\startbooktitle
Novel Name
\stopbooktitle

\startbookauthor
Author Name
\stopbookauthor


The lua filter code that generates the ConTeXt macro follows:

function Div( element )
  local annotation = element.classes:find_if( matches )

  if annotation then
    annotation = annotation:gsub( "[^%w]*", "" )

    return {
      context( "\\start", annotation ),
      element,
      context( "\\stop", annotation )
    }
  end
end

function matches( s )
  return s:match( "^%a+" )
end

function context( macro, annotation )
  return pandoc.RawBlock( "context", macro .. "book" .. annotation )
end

What--if anything--can be changed in the code to suppress the newlines?

Thank you.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6e342237-d526-4a6d-b637-e2d824f3fdba%40googlegroups.com.