summaryrefslogtreecommitdiff
path: root/src/inlines.c
AgeCommit message (Collapse)Author
2014-11-17Switch cmark_node_inl over to cmark_nodeNick Wellnhofer
2014-11-16Probe for stdbool.hNick Wellnhofer
Let cmake create a cmark_config.h file to deal with platforms missing stdbool.h.
2014-11-16Rename variables named 'new'Nick Wellnhofer
Needed for C++ compatibility.
2014-11-16Cast void pointers explicitlyNick Wellnhofer
Needed for C++ compatibility.
2014-11-16Moved AST details from public header cmark.h to private ast.h.John MacFarlane
2014-11-15Don't expose append_inlines.John MacFarlane
2014-11-13Removed ast modules, moved these defs back to cmark.h.John MacFarlane
2014-11-13Moved ast-manipulating functions from inlines to ast.John MacFarlane
2014-11-13inline static -> static inline for consistency.John MacFarlane
2014-11-13Moved cmark_free_inlines from inlines to ast.John MacFarlane
2014-11-12Merge pull request #195 from nwellnhof/fix_namespace_pollutionJohn MacFarlane
Fix namespace pollution
2014-11-12Mark some functions as staticNick Wellnhofer
2014-11-12Removed some no-longer-used code in C impl.John MacFarlane
2014-11-11Don't include debug.h in any production code.John MacFarlane
It uses some GNU-specific things.
2014-11-10Fixed memory allocation bug.John MacFarlane
2014-11-10Allow images to contain images.John MacFarlane
2014-11-10Variable renaming in inlines.c.John MacFarlane
2014-11-09Fixed bug.John MacFarlane
Need to remove open delimiters from the stack when they don't match for a link.
2014-11-09Restored priority of links over emphasis grouping.John MacFarlane
Now when we encounter (possibly) closing `*` or `_` delimiters, we simply add them to the delimiters stack. This gets processed by `process_emphasis` either (a) when a link is created (in which case only the inlines created by the link are processed) or at the end of processing a run of inlines.
2014-11-09Added MAX_LINK_LABEL_LENGTH to cmark.h.John MacFarlane
Use in link label parsing and reference lookup.
2014-11-09Removed some unused code.John MacFarlane
2014-11-09Disallow links inside links and images inside images.John MacFarlane
2014-11-09Fixed backslash-escape inside link label.John MacFarlane
Down to 8 failures, all cases where the spec will need to be changed to reflect lack of priority of links over emphasis.
2014-11-09Fixed problem with images.John MacFarlane
2014-11-09Fixed allocation issue.John MacFarlane
2014-11-09Got ref links working, but with deallocation issues.John MacFarlane
2014-11-09Got inline links working.John MacFarlane
2014-11-09Initial steps towards link parsing.John MacFarlane
2014-11-09Simplified link_label parser.John MacFarlane
It now just scans for an unescaped `]`. No `[` characters are permitted in labels. Backticks don't have their usual meaning in labels. This accords with the behavior of some of the main Markdown parsers: marked, sundown, discount, kramdown, showdown, Markdown.pl, PHP Markdown.
2014-11-07Removed unused emphasis_nestlevel.John MacFarlane
2014-11-07Factored out push_delimiter.John MacFarlane
Conflicts: src/inlines.c
2014-11-07Replace parse_inlines_while with parse_inlines_from_subject.John MacFarlane
2014-11-06Quick fix to #168.John MacFarlane
Ultimately we'll have a better (stack-based?) parser for links, and we can have something more elegant. This fix removes an optimization which gave wrong results for `*hi [there*]`.
2014-11-06Reformatted code consistently.John MacFarlane
2014-11-05Give warning on unknown inline type.John MacFarlane
2014-11-05Improved free_inlines.John MacFarlane
2014-11-05Removed stack limits in inline parsing.John MacFarlane
This brings back segfaults, but we're now aiming for a better solution, revising the renderer so it doesn't use recursion, and using a stack approach for nested brackets. Removing these limits will allow us to know when we've got it right. See #166, #187.
2014-11-05free_inlines: use non-recursive algorithm.John MacFarlane
This will help avoid stack overflows in deeply nested structures. Partially addresses #187 (still need to do renderers).
2014-11-05Removed recursive call to handle_strong_emph.John MacFarlane
Closes #186 - in a somewhat different way than in the PR. This is simpler and I don't see any significant impact on performance in my tests.
2014-11-03Removed artificial rule for emph/strong markers.John MacFarlane
Previously there was a rule that nothing in a string of more than 3 `*` or `_` characters could close or start emphasis. This was artifical and led to strange asymmetries, e.g. you could have `*a *b**` emph within emph but not `**a **b****` strong within strong. The new parsing strategy makes it easy to remove this limitation. Spec, js, and c implementations have been updated. Spec might need some further grooming.
2014-10-28Disallow bracketed labels nested more than 1000 deep.John MacFarlane
For performance reasons. See #166.
2014-10-28Changed EMPHASIS_STACK_LIMIT -> STACK_LIMIT.John MacFarlane
We'll also use it in parsing bracketed link labels.
2014-10-28Rename number_of_emphasis_openers -> emphasis_nestlevel.John MacFarlane
2014-10-26Add EMPHASIS_STACK_LIMIT.John MacFarlane
If we get more than 1000 deep in potential emphasis/strong emphasis openers, we refuse to add more to the stack. This prevents the sort of stack overflow we previously got with python -c 'print "*a **a " * 100000; print " a** a*" * 100000' | ./cmark Partially addresses #166.
2014-10-24Renamed c program and library stmd -> cmark.John MacFarlane
Also renamed internal library functions accordingly.
2014-10-24Merge branch 'master' of https://github.com/tchetch/stmd into tchetch-masterJohn MacFarlane
Conflicts: src/inlines.c
2014-10-24Use unsigned char, not char, throughout.John MacFarlane
Closes #43.
2014-10-24Fixed a memory allocation error.John MacFarlane
2014-10-24Fixed memory leak by freeing all unused emphasis openers.John MacFarlane
2014-10-24Renamed subj->last_emphasis to subj->emphasis_openers.John MacFarlane