summaryrefslogtreecommitdiff
path: root/src/html
AgeCommit message (Collapse)Author
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-23Do not distinguish btw fenced and indented code in AST.John MacFarlane
Use a single CMARK_NODE_CODE_BLOCK tag for both. Distinguish them when needed for parsing by looking at the fence_length attribute, which is 0 for indented blocks.
2014-11-23Revert "Revert "Remove distinction btw atx and setext header in AST.""John MacFarlane
This reverts commit 4570eb2bff2e1b71fa5b6408abbc69c98ff5ff24.
2014-11-22Revert "Remove distinction btw atx and setext header in AST."John MacFarlane
This reverts commit a71423f6ee1b77d9f79d42599ea00b4ca99f5da0. Not quite sure about this change, so reverting for now. Note that we still have a distinction between fenced and indented code blocks in the AST. These two distinctions seem to stand or fall together.
2014-11-22Remove distinction btw atx and setext header in AST.John MacFarlane
Now we just have 'header' -- Setext and ATX are just two ways of forming these; it's not a semantic difference that should remain in the AST.
2014-11-22Renamed NODE_BQUOTE -> NODE_BLOCK_QUOTE.John MacFarlane
2014-11-22C html renderer: ensure newline before hr or raw html block.John MacFarlane
2014-11-22Make render_html return a char*Nick Wellnhofer
2014-11-22Stackless HTML renderingNick Wellnhofer
Now that every node has a parent pointer, it's possible to implement the HTML rendering functions without render stacks and any dynamic memory allocations. This commit also adds some minor optimizations that eliminate some strbuf_put* calls for the common case and avoid printf for headers.
2014-11-21html: Simplified render_stack code.John MacFarlane
Now that we have just one node type, it is not necessary to have two separate 'push' functions.
2014-11-19cmark: Add space before '/' in img tag.John MacFarlane
2014-11-18Make render_html support nodes with no childrenNick Wellnhofer
For empty inline nodes like EMPH, the parser always creates a child containing an empty string. Using the tree manipulation API, nodes with no children can be created. Adjust render_html to cope.
2014-11-18html: Removed union from RenderStack.John MacFarlane
It doesn't make sense to have a union here, and this simplifies the code.
2014-11-17Store link labels as children in tree structureNick Wellnhofer
2014-11-17Rename ast.h to parser.hNick Wellnhofer
2014-11-17Switch cmark_node_inl over to cmark_nodeNick Wellnhofer
2014-11-17Switch cmark_node_block over to cmark_nodeNick Wellnhofer
2014-11-16Export enums for inline, block types, list and list delim types.John MacFarlane
Also switched from `bullet`, `ordered`, `parens`, `period` to `CMARK_BULLET_LIST`, `CMARK_ORDERED_LIST`, `CMARK_PAREN_DELIM`, `CMARK_PERIOD_DELIM`.
2014-11-16Added targets to regenerate html_unescape.h and case_fold_switch.inc.John MacFarlane
For now these are just in the regular Makefile, not in CMakeLists.txt, since the generated files are in the repo and shouldn't ordinarily be regenerated. Note that html_unescape.h is a bit different on regeneration, and this removes error messages we were getting with Clang.
2014-11-16Feature test for __builtin_expectNick 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-16Create html_unescape.h as ANSI CNick Wellnhofer
Pass -L ANSI-C to gperf to create more compatible code.
2014-11-16cmark_render_html now just returns a regular C string.John MacFarlane
This way, we don't have to expose buffer.h; it is just used internally.
2014-11-16Moved AST details from public header cmark.h to private ast.h.John MacFarlane
2014-11-16Rename include guards for consistency and to avoid reserved identifiersCraig Barnes
2014-11-14Exported some functions from buffer that are used elsewhere.John MacFarlane
2014-11-11Added cmark_markdown_to_html with a simple interface.John MacFarlane
See #70.
2014-11-10html_unescape: Made find_entity staticJohn MacFarlane
2014-11-09Fixed allocation issue.John MacFarlane
2014-11-06Made blocks_to_html non-recursive (using a stack).John MacFarlane
This will help avoid stack overflows with deeply nested structures. See #187.
2014-11-06Reformatted code consistently.John MacFarlane
2014-11-06HTML renderer: render alt text as plain, unformatted string.John MacFarlane
2014-11-06Use render stack for inline links.John MacFarlane
2014-11-05Use regular strings for literal in render_stack.John MacFarlane
2014-11-05Use stack approach for rendering strong, emph.John MacFarlane
2014-11-05Added basic infrastructure for render_stack.John MacFarlane
2014-10-24Renamed c program and library stmd -> cmark.John MacFarlane
Also renamed internal library functions accordingly.
2014-09-18Fix memory leak when rendering images as HTMLJordan Milne
2014-09-15Cleanup external APIsVicent Marti
2014-09-10Handle overflows in the codepoint parserVicent Marti
2014-09-09Update the spec with better entity handlingVicent Marti
2014-09-09OopsVicent Marti
2014-09-09Fix the class attribute for code fencesVicent Marti
2014-09-09Abstract the Block unionVicent Marti
2014-09-09Entity declarationsVicent Marti
2014-09-09UTF8-aware detabbing and entity handlingVicent Marti
2014-09-09Rename block literalsVicent Marti
2014-09-09Rename node_blockVicent Marti
2014-09-09Rename `inl`Vicent Marti
2014-09-09Rename inlVicent Marti