Comments (3)
Try the latest version that's checked in here; it should fix that particular problem.
from discount.
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.
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);
+} - old_qstring = mkd_e_qstring(MyQstring);
main(int argc, char *_argv)
{
int opt;
int rc;
@@ -145,10 +153,12 @@ main(int argc, char *_argv)
}
argc -= optind;
argv += optind;
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)
- Call to ldconfig in librarian.sh cannot be disabled HOT 3
- make fails with link error HOT 2
- New release soon? HOT 4
- Flag for copying img alt text to title. HOT 5
- About the latest release HOT 7
- Mishandling Activity Pub addresses? HOT 1
- Mishandling of two footnotes one after another HOT 4
- [Feature suggestion] Relaxed parsing for <?theme action?> HOT 1
- [Feature suggestion] Allow class-blocks with multiple classes HOT 2
- RFE: is it possible to start making github releases?🤔 HOT 2
- [crash] When using -x -E, the program attempts to free a string in argv HOT 3
- [crash] When using -T and provide a lot of '#', a heap-buffer-overflow is occured HOT 2
- [crash] Null pointer dereference occurs when using -d HOT 2
- [crash] Out-of-bounds read occurs when using -F 0x03000000 HOT 2
- [crash] Heap buffer overflow occurs when generating a TOC for a header with a lot of spaces as suffix HOT 1
- [crash] heap-use-after-free occurs when using -b and -E HOT 3
- 2.2.7d: is not gcc 14.x ready HOT 3
- # inside <Code> HOT 3
- Fence code block issue HOT 10
- Intentional fallthroughs? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discount.