On Mon, Oct 17, 2016 at 12:05 AM, Joe Mistachkin <sql...@mistachkin.com>
wrote:

>
> Stephan Beal, can you comment on these changes please?
>

Apologies, i didn't see this (i don't read much mail these days - still on
medical leave for my hands [though the good news is that it's _not_ RSI,
but more likely delayed nerve damage from radiation treatment 10 years
ago]).

> On Oct 16, 2016, at 2:36 PM, BohwaZ <boh...@bohwaz.net> wrote:
> >
> > Just posted the patch earlier on this list, here it is:
> >
> > Index: src/json_wiki.c
> > ==================================================================
> > --- src/json_wiki.c
> > +++ src/json_wiki.c
> > @@ -110,19 +110,27 @@
> >                     json_julian_to_timestamp(pWiki->rDate));
> >     if(0 == contentFormat){
> >       cson_object_set(pay,"size",
> >                       json_new_int((cson_int_t)(
> zBody?strlen(zBody):0)));
> >     }else{
> > -      if( contentFormat>0 ){/*HTML-ize it*/
> > +      if (contentFormat > 0) {
> >         Blob content = empty_blob;
> >         Blob raw = empty_blob;
> >         zFormat = "html";
> > +
> >         if(zBody && *zBody){
> >           blob_append(&raw,zBody,-1);
> > -          wiki_convert(&raw,&content,0);
> > +
> > +          if( pWiki->zMimetype==0 || fossil_strcmp(pWiki->zMimetype,
> "text/x-fossil-wiki")==0 ){
> > +            wiki_convert(&raw,&content,0);
> > +          }else if( fossil_strcmp(pWiki->zMimetype,
> "text/x-markdown")==0 ){
> > +            markdown_to_html(&raw, 0, &content);
> > +          }
> > +
> >           len = (unsigned int)blob_size(&content);
> >         }
>

Without having tried it, that looks fine to me. As i understand it, it
simply adds markdown export support and removes the now-incorrect "HTML-ize
it" comment.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to