Skip to content

Commit

Permalink
Merge 438f59c into 42cec09
Browse files Browse the repository at this point in the history
  • Loading branch information
LikaKavkasidze committed Oct 1, 2020
2 parents 42cec09 + 438f59c commit 154757b
Show file tree
Hide file tree
Showing 322 changed files with 8,004 additions and 18,859 deletions.
15,149 changes: 6,216 additions & 8,933 deletions package-lock.json

Large diffs are not rendered by default.

70 changes: 40 additions & 30 deletions package.json
Expand Up @@ -3,42 +3,52 @@
"testPathIgnorePatterns": [
"/node_modules/"
],
"collectCoverage": true
"collectCoverage": true,
"collectCoverageFrom": [
"packages/**/src/*.js",
"packages/zmarkdown/plugins/*.js",
"packages/zmarkdown/postprocessors/*.js",
"packages/zmarkdown/renderers/*.js",
"packages/zmarkdown/utils/*.js",
"packages/zmarkdown/*.js",
"!**/*.config.js"
]
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/polyfill": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"axios": "^0.19.2",
"babel-jest": "^25.1.0",
"babel-loader": "^8.0.6",
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/polyfill": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"axios": "^0.20.0",
"babel-jest": "^26.3.0",
"babel-loader": "^8.1.0",
"clone": "^2.1.2",
"core-js": "^3.6.4",
"coveralls": "^3.0.9",
"cross-env": "^7.0.0",
"core-js": "^3.6.5",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"dedent": "^0.7.0",
"del-cli": "^3.0.0",
"eslint": "^6.8.0",
"del-cli": "^3.0.1",
"eslint": "^7.9.0",
"express": "^4.17.1",
"html-differ": "^1.4.0",
"jest": "^25.1.0",
"jest": "^26.4.2",
"jest-environment-node-debug": "^2.0.0",
"lerna": "^3.22.0",
"mdast-util-to-hast": "^7.0.0",
"parallel-webpack": "^2.4.0",
"rehype-stringify": "^6.0.1",
"remark": "^11.0.2",
"remark-math": "^2.0.0",
"remark-parse": "^7.0.2",
"remark-rehype": "^5.0.0",
"remark-stringify": "^7.0.4",
"lerna": "^3.22.1",
"mdast-util-to-hast": "^9.1.2",
"parallel-webpack": "^2.6.0",
"rehype-stringify": "^8.0.0",
"remark": "^12.0.1",
"remark-footnotes": "^2.0.0",
"remark-math": "^3.0.1",
"remark-parse": "^8.0.3",
"remark-rehype": "^7.0.0",
"remark-stringify": "^8.1.1",
"sync-request": "^6.1.0",
"textr": "^0.3.0",
"unified": "^8.4.2",
"unist-util-visit": "^2.0.1",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
"unified": "^9.2.0",
"unist-util-visit": "^2.0.3",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
},
"scripts": {
"pretest": "npm run lint && lerna run pretest --scope zmarkdown",
Expand All @@ -51,21 +61,21 @@
"build-demo": "lerna run release --scope zmarkdown && del-cli ./packages/zmarkdown/public/js && cp -r ./packages/zmarkdown/client/dist ./packages/zmarkdown/public/js"
},
"engines": {
"node": ">=8",
"node": ">=10",
"npm": ">=6"
},
"private": true,
"name": "zmarkdown-meta",
"dependencies": {
"deepmerge": "^4.2.2",
"hast-util-sanitize": "^2.0.1",
"hast-util-sanitize": "^3.0.0",
"mdast-util-split-by-heading": "file:packages/mdast-util-split-by-heading",
"rebber": "file:packages/rebber",
"rebber-plugins": "file:packages/rebber-plugins",
"rehype-footnotes-title": "file:packages/rehype-footnotes-title",
"rehype-html-blocks": "file:packages/rehype-html-blocks",
"rehype-postfix-footnote-anchors": "file:packages/rehype-postfix-footnote-anchors",
"rehype-sanitize": "^3.0.0",
"rehype-sanitize": "^4.0.0",
"remark-abbr": "file:packages/remark-abbr",
"remark-align": "file:packages/remark-align",
"remark-captions": "file:packages/remark-captions",
Expand Down
5 changes: 1 addition & 4 deletions packages/mdast-util-split-by-heading/package.json
Expand Up @@ -18,14 +18,11 @@
"src",
"README.md"
],
"engines": {
"node": ">=6"
},
"keywords": [
"mdast"
],
"license": "MIT",
"dependencies": {
"unist-util-visit": "^2.0.1"
"unist-util-visit": "^2.0.3"
}
}
3 changes: 3 additions & 0 deletions packages/rebber-plugins/README.md
Expand Up @@ -9,6 +9,7 @@ It currently supports:
* [remark-align][]
* [remark-custom-blocks][]
* [remark-emoticons][]
* [remark-footnotes][]
* [remark-grid-tables][]
* [remark-iframes][]
* [remark-kbd][]
Expand Down Expand Up @@ -180,6 +181,8 @@ console.log(contents);

[remark-emoticons]: https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-emoticons#remark-emoticons--

[remark-footnotes]: https://github.com/remarkjs/remark-footnotes

[remark-grid-tables]: https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-grid-tables#remark-grid-tables--

[remark-iframes]: https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-iframes#remark-iframes--
Expand Down
189 changes: 180 additions & 9 deletions packages/rebber-plugins/__tests__/__snapshots__/rebber.test.js.snap
Expand Up @@ -339,18 +339,189 @@ Mathilde & 35 \\\\\\\\ \\\\hline
`;

exports[`footnotes 1`] = `
"\\\\part{mytitle A\\\\textsuperscript{\\\\ref{footnote:footnoteref}}}
"\\\\part{International Radiotelephony Spelling Alphabet\\\\textsuperscript{\\\\footnotemark{footnote:wiki}}}
\\\\footnotetext[footnoteref]{\\\\label{footnote:footnoteref} reference in title}
Here's the NATO phonetic alphabet\\\\textsuperscript{\\\\footnotemark{footnote:wiki}}: Alfa, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliet, Kilo, Lima, Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor\\\\textsuperscript{\\\\footnotemark{footnote:name}}\\\\textsuperscript{\\\\footnotemark{footnote:consecutive}}, Whiskey, X-ray, Yankee, and Zulu.
\\\\part{mytitle B\\\\footnote[l5c12o74]{\\\\label{footnote:l5c12o74} footnoterawhead inner}\\\\protect}
\\\\part{myti\\\\textit{tle C\\\\footnote[l7c13o112]{\\\\label{footnote:l7c13o112} foo inner}\\\\protect}}
And here's some more text.
a paragraph\\\\footnote[l9c12o138]{\\\\label{footnote:l9c12o138} footnoteRawPar inner}
\\\\footnotetext[wiki]{\\\\footnotemark{footnote:wiki} Read more about it here.}
\\\\footnotetext[wiki]{\\\\footnotemark{footnote:wiki} And here.}
\\\\footnotetext[wiki2]{\\\\footnotemark{footnote:wiki2} Here's another good article on the subject.}
\\\\footnotetext[name]{\\\\footnotemark{footnote:name} A great first name.}
\\\\footnotetext[consecutive]{\\\\footnotemark{footnote:consecutive} I know.}
The NATO phonetic alphabet\\\\textsuperscript{\\\\footnotemark{footnote:wi\\\\-ki}}.
\\\\footnotetext[wi\\\\-ki]{\\\\footnotemark{footnote:wi\\\\-ki} Read more about it somewhere else.}
This example checks that \\\\footnote[l17c26o614]{\\\\footnotemark{footnote:l17c26o614} the generated} IDs do not overwrite the user's IDs\\\\textsuperscript{\\\\footnotemark{footnote:1}}.
\\\\footnotetext[1]{\\\\footnotemark{footnote:1} Old behavior would, for \\"generated\\", generate a footnote with an ID set to \\\\texttt{1}, thus overwriting this footnote.}
The NATO phonetic alphabet\\\\textsuperscript{\\\\footnotemark{footnote:wiki3}}.
\\\\footnotetext[wiki3]{\\\\footnotemark{footnote:wiki3} Read more about it somewhere else.}
This is an example of an inline footnote.\\\\footnote[l25c42o918]{\\\\footnotemark{footnote:l25c42o918} This is the \\\\textit{actual} footnote.}
This one isn't even [defined].
\\\\textsuperscript{\\\\footnotemark{footnote:both}}[invalid], \\\\footnote[l29c19o1015]{\\\\footnotemark{footnote:l29c19o1015} this too}[].
\\\\begin{enumerate}
\\\\item\\\\relax \\\\hyperref[bar]{foo}
\\\\item\\\\relax \\\\textsuperscript{\\\\footnotemark{footnote:foo}}\\\\hyperref[bar]{bar}
\\\\item\\\\relax [foo]
\\\\item\\\\relax \\\\textsuperscript{\\\\footnotemark{footnote:foo}}\\\\textsuperscript{\\\\footnotemark{footnote:bar}}
\\\\end{enumerate}
A footnote\\\\textsuperscript{\\\\footnotemark{footnote:2}}.
\\\\footnotetext[2]{\\\\footnotemark{footnote:2} Including \\\\footnote[l38c17o1125]{\\\\footnotemark{footnote:l38c17o1125} another \\\\textbf{footnote}}}
A footnote\\\\textsuperscript{\\\\footnotemark{footnote:tostring}} and \\\\textsuperscript{\\\\footnotemark{footnote:__proto__}} and \\\\textsuperscript{\\\\footnotemark{footnote:constructor}}.
\\\\footnotetext[tostring]{\\\\footnotemark{footnote:tostring} See \\\\texttt{Object.prototype.toString()}.}
\\\\footnotetext[constructor]{\\\\footnotemark{footnote:constructor} See \\\\texttt{Object.prototype.valueOf()}.}
\\\\footnotetext[__proto__]{\\\\footnotemark{footnote:__proto__} See \\\\texttt{Object.prototype.\\\\_\\\\_proto\\\\_\\\\_()}.}
foo\\\\textsuperscript{\\\\footnotemark{footnote:abc}} bar. foo\\\\textsuperscript{\\\\footnotemark{footnote:xyz}} bar
\\\\footnotetext[abc]{\\\\footnotemark{footnote:abc} Baz baz}
\\\\footnotetext[xyz]{\\\\footnotemark{footnote:xyz} Baz}
Lorem ipsum dolor sit amet\\\\textsuperscript{\\\\footnotemark{footnote:3}}.
Nulla finibus\\\\textsuperscript{\\\\footnotemark{footnote:4}} neque et diam rhoncus convallis.
\\\\footnotetext[3]{\\\\footnotemark{footnote:3} Consectetur \\\\textbf{adipiscing} elit. Praesent dictum purus ullamcorper ligula semper pellentesque\\\\textsuperscript{\\\\footnotemark{footnote:3}}.
\\\\begin{itemize}
\\\\item\\\\relax Containing a list.
\\\\end{itemize}}
\\\\footnotetext[4]{\\\\footnotemark{footnote:4} Nam dictum sapien nec sem ultrices fermentum. Nulla \\\\textbf{facilisi}. In et feugiat massa.}
\\\\footnotetext[5]{\\\\footnotemark{footnote:5} Nunc dapibus ipsum ut mi \\\\textit{ultrices}, non euismod velit pretium.}
Here is some text containing a footnote\\\\textsuperscript{\\\\footnotemark{footnote:somesamplefootnote}}. You can then continue your thought...
\\\\footnotetext[somesamplefootnote]{\\\\footnotemark{footnote:somesamplefootnote} Here is the text of the footnote itself.}
Even go to a new \\\\hyperref[paragraph]{paragraph} and the footnotes will go to the bottom of the document\\\\textsuperscript{\\\\footnotemark{footnote:documentdetails}}.
\\\\footnotetext[documentdetails]{\\\\footnotemark{footnote:documentdetails} Depending on the \\\\textbf{final} form of your document, of course. See the documentation and experiment.
This footnote has a second \\\\hyperref[paragraph]{paragraph}.}
\\\\footnote{\\\\label{paragraph}\\\\externalLink{http://example.com}{http://example.com}}
\\\\part{my heading\\\\footnote[l76c13o2284]{\\\\footnotemark{footnote:l76c13o2284} ref def}\\\\protect}
or
\\\\part{my heading\\\\textsuperscript{\\\\footnotemark{footnote:ref}}}
\\\\footnotetext[ref]{\\\\footnotemark{footnote:ref} def}
First\\\\footnote[l84c6o2338]{\\\\footnotemark{footnote:l84c6o2338} the generated} and then a manual numbered def\\\\textsuperscript{\\\\footnotemark{footnote:def}}.
\\\\footnotetext[def]{\\\\footnotemark{footnote:def} hello}
\\\\begin{itemize}
\\\\item\\\\relax one\\\\footnote[l89c6o2415]{\\\\footnotemark{footnote:l89c6o2415} the first}
\\\\item\\\\relax two\\\\textsuperscript{\\\\footnotemark{footnote:2nd}}
\\\\item\\\\relax three\\\\textsuperscript{\\\\footnotemark{footnote:3rd}}
\\\\item\\\\relax four\\\\footnote[l92c7o2460]{\\\\footnotemark{footnote:l92c7o2460} the last}
\\\\end{itemize}
\\\\footnotetext[2nd]{\\\\footnotemark{footnote:2nd} second}
\\\\footnotetext[3rd]{\\\\footnotemark{footnote:3rd} third}
This nested footnote would not work:
\\\\hyperref[baz]{\\\\textsuperscript{\\\\footnotemark{footnote:foo2}}}
\\\\footnote{\\\\label{bar}\\\\externalLink{https://bar.com}{https://bar.com}}
\\\\footnote{\\\\label{baz}\\\\externalLink{https://baz.com}{https://baz.com}}
\\\\footnotetext[foo2]{\\\\footnotemark{footnote:foo2} A footnote.}
\\\\chapter{New list continuation}
\\\\begin{enumerate}
\\\\item\\\\relax \\\\textsuperscript{\\\\footnotemark{footnote:foo}}
\\\\end{enumerate}
\\\\footnotetext[foo]{\\\\footnotemark{footnote:foo} bar baz.}
\\\\part{mytitle A\\\\textsuperscript{\\\\footnotemark{footnote:footnoteref}}}
\\\\footnotetext[footnoteref]{\\\\footnotemark{footnote:footnoteref} reference in title}
\\\\part{mytitle B\\\\footnote[l117c12o2768]{\\\\footnotemark{footnote:l117c12o2768} footnoterawhead inner}\\\\protect}
\\\\part{myti\\\\textit{tle C\\\\footnote[l119c13o2806]{\\\\footnotemark{footnote:l119c13o2806} foo inner}\\\\protect}}
a paragraph\\\\footnote[l121c12o2832]{\\\\footnotemark{footnote:l121c12o2832} footnoteRawPar inner}
"
`;
Expand Down Expand Up @@ -879,11 +1050,11 @@ Sub & Headings & \\\\abbr{ABBR}{abbreviation} \\\\\\\\ \\\\hline
& normal & cell \\\\\\\\ \\\\hline
multi \\\\endgraf line \\\\endgraf \\\\endgraf cells \\\\endgraf too & \\\\multicolumn{2}{|m{\\\\dimexpr(\\\\linewidth) * 2 / 3}|}{\\\\parbox{\\\\linewidth}{cells can be \\\\endgraf \\\\textit{formatted} \\\\endgraf \\\\textbf{paragraphs}}} \\\\\\\\ \\\\hline
\\\\end{longtabu}
\\\\captionof{table}{The new table \\\\abbr{ABBR}{abbreviation} \\\\textsuperscript{\\\\ref{footnote:foot}} with \\\\keys{CTRL} + \\\\keys{S}}
\\\\captionof{table}{The new table \\\\abbr{ABBR}{abbreviation} \\\\textsuperscript{\\\\footnotemark{footnote:foot}} with \\\\keys{CTRL} + \\\\keys{S}}
\\\\footnotetext[foot]{\\\\label{footnote:foot} a foot}
\\\\footnotetext[foot]{\\\\footnotemark{footnote:foot} a foot}
\\\\begin{longtabu}{|m{\\\\dimexpr(\\\\linewidth) / 2}|m{\\\\dimexpr(\\\\linewidth) / 2}|} \\\\hline
\\\\rowfont[c]{\\\\bfseries}
Expand Down Expand Up @@ -1025,10 +1196,10 @@ print('bla')
`;
exports[`mix-5 1`] = `
"\\\\image{http://www.numerama.com/content/uploads/2016/07/espace.jpg}[espace\\\\textsuperscript{\\\\ref{footnote:node}}]
"\\\\image{http://www.numerama.com/content/uploads/2016/07/espace.jpg}[espace\\\\textsuperscript{\\\\footnotemark{footnote:node}}]
\\\\footnotetext[node]{\\\\label{footnote:node} Two things are infinite: the universe and human stupidity.}"
\\\\footnotetext[node]{\\\\footnotemark{footnote:node} Two things are infinite: the universe and human stupidity.}"
`;
exports[`mix-6 1`] = `
Expand Down

0 comments on commit 154757b

Please sign in to comment.