markdown-toc icon indicating copy to clipboard operation
markdown-toc copied to clipboard

Should strip out links and html on headings

Open evandrocoan opened this issue 7 years ago • 0 comments

> mocha



  plugin
    √ should work as a remarkable plugin (110ms)

  options: custom functions:
    √ should allow a custom `strip` function to strip words from heading text:
    √ should allow a custom slugify function to be passed:
    √ should strip forward slashes in slugs
    √ should strip backticks in slugs
    √ should strip CJK punctuations in slugs
    √ should strip & in slugs
    √ should escape the CJK characters in linkify
    √ should strip HTML tags from headings
    √ should not strip HTML tags from headings when `stripHeadingTags` is false
    √ should condense spaces in the heading text
    √ should replace spaces in links with dashes
    √ should allow a `filter` function to filter out unwanted bullets:

  toc
    √ should generate a TOC from markdown headings:
    √ should allow duplicate headings:
    √ should increment duplicate headings:
    √ should allow and ignore empty headings:
    √ should handle dots, colons dashes and underscores correctly:
    √ should use a different bullet for each level
    √ should use a different bullet for each level
    √ should handle mixed heading levels:
    √ should ignore headings in fenced code blocks.
    √ should allow `maxdepth` to limit heading levels:
    √ should remove the first H1 when `firsth1` is false:
    - should correctly calculate `maxdepth` when `firsth1` is false:
    √ should allow custom bullet points to be defined:
    √ should rotate bullets when there are more levels than bullets defined:
    √ should rotate bullets when there are more levels than bullets defined:
    √ should wrap around the bullet point array
    √ should allow custom bullet points at different depths
    √ should remove diacritics from the links
    √ should strip words from heading text, but not from urls:
    √ should strip out links and html on headings

  toc tokens
    √ should return an object for customizing a toc:
    √ should return the `highest` heading level in the TOC:
    √ should return an array of tokens:
    √ should expose the `lvl` property on headings tokens:

  json property
    √ should expose a `json` property:
    √ should return the `content` property for a heading:

  toc.insert
    √ should retain trailing newlines in the given string
    √ should insert a markdown TOC beneath a `<!-- toc -->` comment. (115ms)
    √ should replace an old TOC between `<!-- toc -->...<!-- tocstop -->` comments.
    √ should insert the toc passed on the options.
    √ should accept options
    √ should accept no links option


  44 passing (289ms)
  1 pending

evandrocoan avatar Aug 18 '18 19:08 evandrocoan