Releases: commonmark/commonmark.js
Releases · commonmark/commonmark.js
commonmark.js 0.19.0
- Fixed underscore emphasis to conform to spec changes (commonmark/commonmark-spec#317, #12).
- Fixed variable shadowing (linter warnings) in
test.js
. - Makefile: Moved
lint
first to avoid regeneratingdist
by accident. - Dingus: Fixed word wrapping in text area (commonmark/commonmark-spec#319).
- Updated
spec.txt
intest/
. - Added
release_checklist.md
.
commonmark.js 0.18.2
- Fixed walker so that it stops at
this.root
, even when this is
not the document root. - Fixed typo (Ed Adams).
- Removed unused argument from
processEmphasis
(Robin Stocker). - Shortened code for removing a sequence of delimiters, changing the
links on the edges rather than dropping them one by one
(Eli Barzilay). - Code layout improvements for readability (Eli Barzilay).
- Dingus: rewrote without ACE editor for better accessibility
and to fix layout in smal windows (#11). - Optimize checking for final spaces in
parseNewline
(Robin
Stocker). This yields a 5-10% speed improvement inmake bench
. - Consolidated regex definitions (Robin Stocker).
- Return boolean from
spnl
andparseBackticks
for consistency
(Robin Stocker). - Removed unnecessary check for hrule in
parseListMarker
(Robin
Stocker). - Return error status if tests fail.
- Use
encode
/decode
from markdown-it/mdurl for URL
normalization. This fixes cases like[link](http://google.com/?q=%3f)
which was formerly wrongly converted to
<a href="http://google.com/?q=%253f">link</a>
(#9). - Refactored
test.js
, addingsmart_punct
tests from cmark, and
factoring outspecTest
function. - Make unmatched double quotes left quotes with
smart_punct
(#14). - Code cleanup in
finalize
.
commonmark.js 0.18.1
- Added
nextNonspace
,blank
,indent
properties toParser
. - Factored out advance-to-nonspace code into
findNextNonspace
. - Put block starts into
blockStarts
property ofParser
. Now
almost all block-specific material has been moved out of
incorporateLine
. - Removed parameter from
addLine
. - Simplified code, removed
matchAt
. - Small optimization in
entityToChar
- Use
charCodeAt
in a few places wherecharAt
was used. - Added
peek()
function in blocks. This ensures we check bounds
before callingcharCodeAt
. - Use
peek
instead of rawcharCodeAt
ininlines.js
. - Dingus improvements:
- Use ACE editor in dingus. Implemented L->R sync scroll. Also,
the block containing the cursor is highlighted on the right. - Split code from
dingus.html
into separate filedingus.js
. - Split CSS into separate file,
dingus.css
. - Added debounce.
- Moved dingus code to
dingus/
directory.dingus/Makefile
buildscommonmark.js
in the dingus directory. So to deploy,
you just need to copy the dingus directory. - Use local copies of js dependencies. Instead of including these in
the repository, though, we have the Makefile install them with bower. - Fixed one-off error in line number calculation.
- XML and HTML are now same font size.
- Allow line wrapping in editor.
- AST window now scrolls like HTML window.
- Use ACE editor in dingus. Implemented L->R sync scroll. Also,
- Updated
reNonSpace
for new whitespace definition in spec. - Added smart punctuation parsing option.
- Added
options
param to InlineParser.options.smart
triggers
smart punctuation parsing. - Added
--smart
option to bin/commonmark. - Implemented "smart" parsing of dashes, ellipses, quotes. The
algorithm is the same as in cmark. - Renamed
handleEmphasis
->handleDelims
. - Added benchmark with
smart
. - Added checkbox for
smart
to dingus.
- Added
- Fixed code example for walk.
- Made
isContainer
a getter to conform to README (#7). - Allow list start number of 0 in HTML writer (#10).
- Fixed use of
isContainer
in XML writer.
isContainer
is now a getter, not a function.
commonmark 0.17.1
- Reorganized block parsing in a more modular way. There is now a
blocks
property of the parser that contains information about each type of block, which is used in parsing. Ultimately this will make it easier to extend the library, but the project is still only partially completed. - Code cleanup and simplification, with some performance optimizations.
- Removed version from
bower.json
. Bower takes version from tags. - Initialize some properties at beginning of 'parse'. This fixes some mistakes in source position when the same Parser object was used to parse multiple times (#3).
- Made parsing of backslash escapes a bit more efficient.
- Removed refmap parameter of InlineParser.parse(). Instead, set the refmap property before running the parser.
- Set
_string_content
to null after using, allowing it to be GCd. - Removed
_strings
; just append to_string_content
. This gives better performance with v8. - Format benchmarks so that samples are linked.
- Added in-browser benchmark.
- Added API documentation to README.
- xml renderer: use
sourcepos
attribute, notdata-sourcepos
. - Changed license to 2-clause BSD. Added clause for spec.
commonmark 0.17
- Renamed
DocParser
->Parser
. Note: library users should update their code or it will break. - Added
normalize-reference.js
. This does a proper unicode case fold instead of just usingtoUpperCase
. It is also faster, partly because we can do one pass for space and case normalization. - Removed artificial distinction btw FencedCode, IndentedCode in
blocks.js
. - Removed vestigial
ReferenceDef
node type. - Added getters and (in some cases) setters for "public" properties of Nodes. Renamed non-public properties to start with underscore. This will allow us to keep the API stable while changing the underlying data structure. And it will avoid exposing properties that have only an instrumental value in parsing.
- Removed
Node.toObject()
. - Rename
bullet_char
->bulletChar
. - Check for blank line before checking indent in Item.
- Removed unnecessary setting of default
tight=true
infinalize
. We do that when thelistData
object is initialized. - Performance optimization - avoid repeating scan for nonspace.
- Moved check for closing fence to close-block-check section. This is a more logical arrangement and addresses commonmark/commonmark-spec#285.
- Added
offset
property toDocParser
. Use this inaddLine
, instead ofoffset
parameter, which has been removed. - Implemented new spec for emphasis and strong emphasis with
_
. html.js
- explicitly specify second parameter ofescapeXml
.- Fixed escaping error in CDATA regex.
- Removed some dead code and fixed incorrect call to
addChild
with three arguments (Robin Stocker). - Adjust
lastLineLength
before returning after close fence. - Propagate
lastLineBlank
up through parents. Previously we just kept it set on the bottom child. But this will give a quicker determination oflastLineBlank
. - Moved continuation checks & finalizers into
blocks
property ofParser
. This is a first step towards keeping the code for each kind of block in a central place, rather than spread all over the code base. This is preparatory for a more modular structure, where each type of block has a record describing how it is parsed and finalized. Eventually this will also contain functions for checking for a block start, and metadata that determines how line data should be handled. - Added
currentLine
property toParser
. - Renamed
first_nonspace
->next_nonspace
. - Put generated
commonmark.js
indist/
rather thanjs/
. - Miscellaneous code cleanup.
- Split JS code into (this) independent repository.
- Added detailed benchmark with samples (
make bench-detailed
). - Added
dist/commonmark.js
to repo (for bower). - Added
bower.json
(commonmark/commonmark-spec#288). - Updated test suite. Now shows how performance depends on length in pathological cases.
- Don't use -1 as second param for .slice. This seems to cause a deoptimization, as reported by
node --trace-deopt
. - Added
CONTRIBUTING.md
. - Added
.travis.yml
to test against various node versions. - Renamed
changelog.js.txt
->changelog.txt
.