summaryrefslogtreecommitdiff
path: root/src/inlines.c
AgeCommit message (Collapse)Author
2014-11-29Fix prev pointer of emph->first_childNick Wellnhofer
2014-11-28Removed cmark_free_nodes from public API.John MacFarlane
Replace it with static S_free_nodes.
2014-11-28Clarified logic in remove_delimiter.John MacFarlane
Motivated by warnings from clang static analyzer.
2014-11-28Use prefixed names for symbols from references.hNick Wellnhofer
2014-11-28Use prefixed names for symbols from inlines.hNick Wellnhofer
2014-11-25Rename NODE_STRING -> NODE_TEXT.John MacFarlane
In JS, use 'Text' instead of 'Str'. In spec, use "plain textual content" instead of "strings."
2014-11-22Fixed #214 C and JS implementations.John MacFarlane
They were gobbling whitespace after shortcut reference links, e.g. [foo] bar [foo]: url Closes #214.
2014-11-18Initialize all fields in node when creating inlines.John MacFarlane
2014-11-17Make sure the emph inline added in process_emphasis has a parent.John MacFarlane
2014-11-17Make parse_inlines add directly to parent.John MacFarlane
Previously parse_inlines returned a list of parsed inlines. This had to be added to the parent, and fix_parents had to be called to manually add the 'parent' links to the children, and the 'last_child' link to the parent. Now parse_inlines takes the parent block as a parameter, and uses cmark_node_append_child to add the children, so that the pointers should be properly managed. This avoids the need for the fix_parents pass.
2014-11-17Set last_child and parent in make_linkNick Wellnhofer
2014-11-17Store link labels as children in tree structureNick Wellnhofer
2014-11-17Set prev, parent and last_child for inlinesNick Wellnhofer
2014-11-17Rename ast.h to parser.hNick Wellnhofer
2014-11-17Move inline-related stuff to inlines.cNick Wellnhofer
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