aboutsummaryrefslogtreecommitdiff
path: root/js
AgeCommit message (Collapse)Author
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-22Fixed #192.John MacFarlane
The C and JS implementations were not registering blank lines after atx headers for purposes of tight/loose list calculation. Exmaple: * item * # block1 ## block2
2014-11-22Updated JS and C implementations for #209.John MacFarlane
A setext header was being treated a if it were a blank line for purposes of tight/loose list determination. Closes #209.
2014-11-22js html renderer: formatting changes to align with changes in spec.John MacFarlane
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-17Fix Issue 202 - Catch RangeError thrown by native String.fromCodePoint (js ↵Guillaume Crico
implementation) When using a JS engine that provides a native String.fromCodePoint ES6 implementation (e.g. SpiderMonkey), a RangeError is thrown if the codepoint is invalid. When adding the from-code-point.js polyfill, the js implementation was modified in order to handle invalid code point by returning the 0xFFFD placeholder glyph. So this is not a real "polyfill", but an specific implementation (adapted to the parser needs). So, if a native String.fromCodePoint implementation is availbale, the fromCodePoint function should catch the RangeError and return the 0xFFFD placeholder glyph.
2014-11-11Bump version on package.json.John MacFarlane
2014-11-10Allow images to contain images.John MacFarlane
2014-11-10jshint improvements.John MacFarlane
2014-11-10Stack-based link handling in js. All tests pass.John MacFarlane
2014-11-09Rewrote parseLink in js consistent with the C and spec.John MacFarlane
2014-11-09Added processEmphasis, run at end of parseInlines.John MacFarlane
2014-11-09Changed parseEmphasis to just put things on stack.John MacFarlane
2014-11-06Updated js writer to render plain text for alt attributes of images.John MacFarlane
2014-11-04Added packaging for npm module 'commonmark'.John MacFarlane
Published to npm. Closes #21. The 'stmd' package should be deprecated.
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-30js/lib/blocks: Made matchAt return -1 instead of null on no match.John MacFarlane
2014-10-26Dingus improvements; moved to top level.John MacFarlane
2014-10-26Added clear and permalink to dingus.John MacFarlane
Serve dingus from dingus.html. Add redirect page as index.html.
2014-10-26Require space before closing # sequence in ATX header.John MacFarlane
Closes #169.
2014-10-25Adjusted appearance of dingus.John MacFarlane
2014-10-24Rename js/bin/markdown -> js/bin/commonmark.John MacFarlane
2014-10-24js/bin/markdown: added `--ast` flag and multiple filename args.John MacFarlane
2014-10-24Merge pull request #140 from arthur-peka/masterJohn MacFarlane
Changing some variable names to improve code readability
2014-10-24More stmd -> commonmark changes.John MacFarlane
2014-10-24Renamed javascript implementation to commonmark.js.John MacFarlane
2014-10-24js: Removed memoization.John MacFarlane
It is no longer needed with the new stack-based emphasis parsing.
2014-10-24js: Use linked list instead of array for emphasis_openers stack.John MacFarlane
2014-10-24js: renamed emph_stack -> emphasis_openers.John MacFarlane
2014-10-23inlines.js: Implemented stack-based emph parsing.John MacFarlane
2014-10-18Added renderAST to js, added AST render tab to dingus.John MacFarlane
Modified processInlines so it creates new objects instead of modifying in place. This way we can remove the extraneous fields only needed for parsing.
2014-10-18Add unescapeString as method of InlineParser.John MacFarlane
2014-10-18Factored out blocks.js from index.js.John MacFarlane
2014-10-18Factored out inlines.js from index.js.John MacFarlane
2014-10-18Change from-code-point.js so it doesn't alter String prototype.John MacFarlane
2014-10-18Use browserify to make js code more modular.John MacFarlane
* Moved js library code to `js/lib`. * `js/stmd.js` is now generated from these files using browserify. * Factored out `html5-entities.js` and `from-code-point.js` from main js parsing code (which is now `index.js`). * Moved `js/markdown` to `js/bin`.
2014-10-07Changed bench.js so it no longer requires oldtests.John MacFarlane
2014-10-07Correct capitalization of JavaScriptBengt Lüers
2014-10-07stmd.js: Fixed entityToChar, adding fromCodePoint polyfill.John MacFarlane
Closes #151.
2014-10-07Reset label_nest_level before parsing reference.John MacFarlane
This fixes a bug with text like: [[some unrelated text [link] [link]: destination See #146.
2014-10-04Further emph fallback optimizations.John MacFarlane
2014-10-04Some jshint fixes.John MacFarlane
2014-10-04Use simpler algorithm.John MacFarlane
This handles things like `**hi***there*` and gives symmetrical treatment of `**hi*` and `*hi**`. Also handles the case from #147.
2014-10-02Revert "Use integers instead of strings for tags."John MacFarlane
This reverts commit ac611d51c9de9aa719b42b9463e6f28d6e7d74a4.
2014-10-02Revert "Use numerical constants."John MacFarlane
This reverts commit db25de09f5dc931c0e2b31ce0ccdb58052f3105f.
2014-10-02Use numerical constants.John MacFarlane
Performance optimization, but at cost of code clarity.
2014-10-02Use integers instead of strings for tags.John MacFarlane
Use === whenever possible to compare them.
2014-10-02Changed inline parsers to be monomorphic and modify inlines param.John MacFarlane
They all return true or false now, instead of the inlines parsed. Performance optimization.