Giter Site home page Giter Site logo

Problem parsing alignment on tables about discount HOT 3 CLOSED

orc avatar orc commented on September 26, 2024
Problem parsing alignment on tables

from discount.

Comments (3)

Orc avatar Orc commented on September 26, 2024

Try the latest version that's checked in here; it should fix that particular problem.

from discount.

mingodad avatar mingodad commented on September 26, 2024

Thanks I did and it worked !

On Wed, Dec 7, 2011 at 5:14 PM, David Parsons <
[email protected]

wrote:

Try the latest version that's checked in here; it should fix that
particular problem.


Reply to this email directly or view it on GitHub:
#37 (comment)

from discount.

mingodad avatar mingodad commented on September 26, 2024

Here is a sugestion to add a user defined callback to filter generated html.


@@ -113,33 +113,44 @@ shift(MMIOT *f, int i)
*/
static void
Qchar(int c, MMIOT *f)
{

block *cur;

  • if ( S(f->Q) == 0 ) {
    cur = &EXPAND(f->Q);
    memset(cur, 0, sizeof *cur);
    cur->b_type = bTEXT;
    }
    else
    cur = &T(f->Q)[S(f->Q)-1];
 EXPAND(cur->b_text) = c;

}

/* Qstring()
_/
static void
-Qstring(char *s, MMIOT *f)
+QstringSTD(char *s, MMIOT *f)
{
while (_s)
Qchar(*s++, f);
}

+typedef void (mkd_qstring_t)(char, MMIOT_);
+
+static void
+(_Qstring)(char *s, MMIOT *f) = &QstringSTD;
+
+mkd_qstring_t
+mkd_e_qstring(mkd_qstring_t qstring_func){

  • mkd_qstring_t old = Qstring;
  • Qstring = qstring_func;
  • return old;
    +}

/* Qwrite()
*/
static void

Qwrite(char *s, int size, MMIOT *f)

@@ -57,15 +57,17 @@ int mkd_generateline(char , int, FILE, mkd_flag_t);

/* url generator callbacks
/
typedef char * (mkd_callback_t)(const char, const int, void
);
typedef void (mkd_free_t)(char, void_);
+typedef void (mkd_qstring_t)(char, MMIOT_);

void mkd_e_url(void *, mkd_callback_t);
void mkd_e_flags(void *, mkd_callback_t);
void mkd_e_free(void *, mkd_free_t );
void mkd_e_data(void *, void *);
+mkd_qstring_t mkd_e_qstring(mkd_qstring_t);

/* version#.
*/
extern char markdown_version[];

void mkd_mmiot_flags(FILE *, MMIOT *, int);

@@ -56,10 +56,18 @@ complain(char *fmt, ...)
va_end(ptr);
fputc('\n', stderr);
fflush(stderr);
}

+static mkd_qstring_t old_qstring;
+static void
+MyQstring(char *s, MMIOT *f)
+{

  • if(strcmp(s, "\n") == 0) s = "
    \n";
  • else if(strcmp(s, "

    ") == 0) s = "

    ";

  • old_qstring(s,f);
    +}
  • main(int argc, char *_argv)
    {
    int opt;
    int rc;
    @@ -145,10 +153,12 @@ main(int argc, char *_argv)
    }

    argc -= optind;
    argv += optind;

    • old_qstring = mkd_e_qstring(MyQstring);

    if ( with_html5 )
    mkd_with_html5_tags();

     if ( use_mkd_line )
    

    rc = mkd_generateline( text, strlen(text), stdout, flags);

    On Wed, Dec 7, 2011 at 5:14 PM, David Parsons <
    [email protected]

    wrote:

    Try the latest version that's checked in here; it should fix that
    particular problem.


    Reply to this email directly or view it on GitHub:
    #37 (comment)

from discount.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.