Commonmark

Latest version: v0.9.1

Safety actively analyzes 625566 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 6

0.20.0

* Ensure that link labels contain non-whitespace (jgm/CommonMark322).
* Strip brackets in `normalize-reference`. Otherwise the stripping
of leading/trailing whitespace doesn't work. For example:

[hi]

[ hi ]: url

* Use U+FFFD for entities resolving to 0 (jgm/CommonMark323).
* Fixed bug with list items indented >= 4 spaces (42).
* Extract regex test results in `scanDelims` as local variables
(Robin Stocker). Also, abort earlier when no delims where found.
* Allow a partial open block tag to be recognized when followed
by a newline with no space (324). For example:

<div
class="foo">

* Added test for alternate line endings.
* Added travis & npm buttons to README.md (Vitaly Puzrin).
* Travis-CI: refresh node.js versions & use docker containers
(Vitaly Puzrin).
* Dingus css: set colors for textarea (319). Otherwise we may run
into problems for people who have set their textarea default
colors.

0.19.0

* Fixed underscore emphasis to conform to spec changes
(jgm/CommonMark317, 12).
* Fixed variable shadowing (linter warnings) in `test.js`.
* Makefile: Moved `lint` first to avoid regenerating `dist` by accident.
* Dingus: Fixed word wrapping in text area (jgm/CommonMark319).
* Updated `spec.txt` in `test/`.
* Added `release_checklist.md`.

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 in `make bench`.
* Consolidated regex definitions (Robin Stocker).
* Return boolean from `spnl` and `parseBackticks` 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`, adding `smart_punct` tests from cmark, and
factoring out `specTest` function.
* Make unmatched double quotes left quotes with `smart_punct` (14).
* Code cleanup in `finalize`.

0.18.1

* Updated `dist/commonmark.js`.

0.18.0

* Added `nextNonspace`, `blank`, `indent` properties to `Parser`.
* Factored out advance-to-nonspace code into `findNextNonspace`.
* Put block starts into `blockStarts` property of `Parser`. 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 where `charAt` was used.
* Added `peek()` function in blocks. This ensures we check bounds
before calling `charCodeAt`.
* Use `peek` instead of raw `charCodeAt` in `inlines.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 file `dingus.js`.
+ Split CSS into separate file, `dingus.css`.
+ Added debounce.
+ Moved dingus code to `dingus/` directory. `dingus/Makefile`
builds `commonmark.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.
* 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.
* 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.

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, not `data-sourcepos`.
* Changed license to 2-clause BSD. Added clause for spec.

Page 3 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.