GithubHelp home page GithubHelp logo

m10rten / markdown-includes Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 307 KB

Multiple markdown utility tags to use inside markdown with this markdown-includes compiler.

Home Page: https://www.npmjs.com/package/markdown-includes

License: MIT License

TypeScript 100.00%
markdown node npm

markdown-includes's Introduction

markdown-includes's People

Contributors

m10rten avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ashleynolan

markdown-includes's Issues

Configuration file

In sight of #17 Goal V2, having a config file is really nice: not needing to put in the parameters every time you run the command.

ofcourse, every parameter given will overwrite the config.

the order will then be:
system defaults < config file < cli parameters < file overwrites: &|menu 4 for example.

Non valid file will not throw error

Implementing the new glob package caused validation of files to be left out.

This needs to be done before hand: validate if the path is an actual string with ext (when no wildcard)

Ignore certain files or folders

when using wildcards, you might start compiling some files you do not need compiled.

introducing the ignore files feature.

set it in your config or cli command like so: --ignore dist,node_modules,build and these will not be compiled.

Table creation

&|table data.json should make a table based on the data and keys in the json, can only be 1 layer deep due to table being one dimensional.

Table with keys, following the results of each value in the array.

`\` breaks output

examples\file.md instead examples/file.md breaks the directory creation.

Multiple files or folder compiling.

To make use of multiple compiled files, you now have to run it for each file.
instead, run it on examples/* or just on --folder examples.
Even mdi file1.md,file2.md should work fine.

every file should then be compiled to the outdir: --out-dir or default out

Implement testing framework: Jest

To ensure quality of this package, tests are required.

  • To be made inside root folder: tests.

  • Implement dev deps: jest & @types/jest.

  • Setup unit tests for all features.

`?` breaks menu

When including a ? in your title, this will not work with the output generated because question marks are not supported.
Therefor they need to be trimmed.

Goal V2

Goal for the v2.0.0 is to have it ready to use within node apps outside cli applications.

This means a complete overhaul of the project.

NTH/Bug: Custom id in menu

Markdown allows for custom heading id's, therefor linking to a heading within the menu can be incorrectly applied.

This looks like:
# title {#custom-id}

This is always 1 string and therefor can be stripped easily by checking if there is a {#} in the title, then removing the specialchars leaving the id.

NTH: Footnote tag

Easily implement a footnote by just adding the footnote tag following the string that should be in the footnote.

The tag looks like: &|footnote This is a footnote and will be placed at the bottom.

For ease of use it will now be implemented where the footnote is always the last element of a line so all followed is in the footnote.

In the future this might be resolved by using some sort of closing tag: |&

Output:
Here's a simple footnote. &|footnote This is the first footnote.

Example will output:

Here's a simple footnote. [^1]

[^1]: This is the first footnote.

Multi line footnotes must be supported.

NTH: Table key selection

Not all data in your JSON file is usefull or ready-to-display, filter the keys you want to display in the table.
! No exceptions !

NTH: Line/Word/Char count

&|count somewhere in your fileand it will count all above lines.
&|words somewhere in your file and it will count all above words.
&|chars somewhere in your file and it will count all above characters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.