mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-28 07:09:44 +00:00
Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cea5f2e43a | ||
|
|
9e2b8477a8 | ||
|
|
5a32ae5cd4 | ||
|
|
10e14bfcfd | ||
|
|
f3c36ffb0a | ||
|
|
1e004977be | ||
|
|
9110e7cf7e | ||
|
|
27e8b54528 | ||
|
|
aa31919563 | ||
|
|
7bf3295fc2 | ||
|
|
9fd3f47689 | ||
|
|
0ca7e43d73 | ||
|
|
b33b3cd49b | ||
|
|
69ef4d7653 | ||
|
|
c98224f3e4 | ||
|
|
4f870de68f | ||
|
|
2cfee2e8ad | ||
|
|
1fe9f0c8d0 | ||
|
|
adc7233cab | ||
|
|
509c7d8832 | ||
|
|
caff1d8e2b | ||
|
|
9202f9c8eb | ||
|
|
097cc220f8 | ||
|
|
2e3c10c35b | ||
|
|
a5aeb7dccd | ||
|
|
92ff776270 | ||
|
|
bf1fb97789 | ||
|
|
2cddc2debe | ||
|
|
0d4a1a11c1 | ||
|
|
aa3cf1d9c1 | ||
|
|
5d0062f610 | ||
|
|
7976917bb9 | ||
|
|
023071c874 | ||
|
|
7da42d3742 | ||
|
|
3269e94757 | ||
|
|
c69f4289ed | ||
|
|
8752a32626 | ||
|
|
8735d1f222 | ||
|
|
21929e676d | ||
|
|
5ca61935a8 | ||
|
|
10143cec93 | ||
|
|
643c8503c0 | ||
|
|
e92d3ecd68 | ||
|
|
4f092828ac | ||
|
|
2d4c211483 | ||
|
|
7d30abc4d9 | ||
|
|
1d513f7a0e | ||
|
|
44922f5261 | ||
|
|
f695cc6948 | ||
|
|
3722387f1f | ||
|
|
8950cb944f | ||
|
|
66fb70a5f8 | ||
|
|
69c242425b | ||
|
|
e6e04ad21d | ||
|
|
7be6b913b0 |
@@ -1,4 +1,4 @@
|
|||||||
FROM node:16.13-alpine
|
FROM node:18-alpine
|
||||||
RUN apk --no-cache add git
|
RUN apk --no-cache add git
|
||||||
|
|
||||||
ENV NODE_ENV=docker
|
ENV NODE_ENV=docker
|
||||||
|
|||||||
14
changelog.md
14
changelog.md
@@ -80,6 +80,16 @@ pre {
|
|||||||
## changelog
|
## changelog
|
||||||
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
|
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
|
||||||
|
|
||||||
|
### Friday 28/06/2023 - v3.9.1
|
||||||
|
{{taskList
|
||||||
|
|
||||||
|
##### G-Ambatte
|
||||||
|
|
||||||
|
* [x] Better error pages with more useful information
|
||||||
|
|
||||||
|
Fixes issue [#1924](https://github.com/naturalcrit/homebrewery/issues/1924)
|
||||||
|
}}
|
||||||
|
|
||||||
### Friday 02/06/2023 - v3.9.0
|
### Friday 02/06/2023 - v3.9.0
|
||||||
{{taskList
|
{{taskList
|
||||||
|
|
||||||
@@ -101,7 +111,7 @@ Fixes issues [#2092](https://github.com/naturalcrit/homebrewery/issues/2092), [#
|
|||||||
|
|
||||||
Fixes issue [#2790](https://github.com/naturalcrit/homebrewery/issues/2790)
|
Fixes issue [#2790](https://github.com/naturalcrit/homebrewery/issues/2790)
|
||||||
|
|
||||||
##### 5e-Clerc
|
##### 5e-Cleric
|
||||||
|
|
||||||
* [x] New {{openSans **PHB → {{fac,book-part-cover}} PART COVER PAGE** }} snippet for V3!
|
* [x] New {{openSans **PHB → {{fac,book-part-cover}} PART COVER PAGE** }} snippet for V3!
|
||||||
|
|
||||||
@@ -145,7 +155,7 @@ Fixes issues [#1679](https://github.com/naturalcrit/homebrewery/issues/1679)
|
|||||||
|
|
||||||
* [x] Add local Windows install script via Chocolatey
|
* [x] Add local Windows install script via Chocolatey
|
||||||
|
|
||||||
##### 5e-Clerc
|
##### 5e-Cleric
|
||||||
|
|
||||||
* [x] New {{openSans **TABLES → {{fas,fa-language}} RUNE TABLE**}} snippets for V3. Adds an alphabetic script translation table.
|
* [x] New {{openSans **TABLES → {{fas,fa-language}} RUNE TABLE**}} snippets for V3. Adds an alphabetic script translation table.
|
||||||
|
|
||||||
|
|||||||
1652
package-lock.json
generated
1652
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "homebrewery",
|
"name": "homebrewery",
|
||||||
"description": "Create authentic looking D&D homebrews using only markdown",
|
"description": "Create authentic looking D&D homebrews using only markdown",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.16.x"
|
"node": ">=18.16.x"
|
||||||
},
|
},
|
||||||
@@ -78,10 +78,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.22.1",
|
"@babel/core": "^7.22.5",
|
||||||
"@babel/plugin-transform-runtime": "^7.22.4",
|
"@babel/plugin-transform-runtime": "^7.22.5",
|
||||||
"@babel/preset-env": "^7.22.4",
|
"@babel/preset-env": "^7.22.5",
|
||||||
"@babel/preset-react": "^7.22.3",
|
"@babel/preset-react": "^7.22.5",
|
||||||
"@googleapis/drive": "^5.1.0",
|
"@googleapis/drive": "^5.1.0",
|
||||||
"body-parser": "^1.20.2",
|
"body-parser": "^1.20.2",
|
||||||
"classnames": "^2.3.2",
|
"classnames": "^2.3.2",
|
||||||
@@ -97,32 +97,33 @@
|
|||||||
"jwt-simple": "^0.5.6",
|
"jwt-simple": "^0.5.6",
|
||||||
"less": "^3.13.1",
|
"less": "^3.13.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"marked": "5.0.4",
|
"marked": "5.1.0",
|
||||||
"marked-extended-tables": "^1.0.6",
|
"marked-extended-tables": "^1.0.6",
|
||||||
"marked-gfm-heading-id": "^3.0.3",
|
"marked-gfm-heading-id": "^3.0.4",
|
||||||
|
"marked-smartypants-lite": "^1.0.0",
|
||||||
"markedLegacy": "npm:marked@^0.3.19",
|
"markedLegacy": "npm:marked@^0.3.19",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"mongoose": "^7.2.2",
|
"mongoose": "^7.3.1",
|
||||||
"nanoid": "3.3.4",
|
"nanoid": "3.3.4",
|
||||||
"nconf": "^0.12.0",
|
"nconf": "^0.12.0",
|
||||||
"npm": "^9.6.7",
|
"npm": "^9.7.2",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-frame-component": "^4.1.3",
|
"react-frame-component": "^4.1.3",
|
||||||
"react-router-dom": "6.11.2",
|
"react-router-dom": "6.14.0",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
"superagent": "^6.1.0",
|
"superagent": "^6.1.0",
|
||||||
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
|
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^8.41.0",
|
"eslint": "^8.43.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.2.2",
|
||||||
"eslint-plugin-react": "^7.32.2",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.5.0",
|
||||||
"jest-expect-message": "^1.1.3",
|
"jest-expect-message": "^1.1.3",
|
||||||
"postcss-less": "^6.0.0",
|
"postcss-less": "^6.0.0",
|
||||||
"stylelint": "^15.6.2",
|
"stylelint": "^15.9.0",
|
||||||
"stylelint-config-recess-order": "^4.0.0",
|
"stylelint-config-recess-order": "^4.2.0",
|
||||||
"stylelint-config-recommended": "^12.0.0",
|
"stylelint-config-recommended": "^12.0.0",
|
||||||
"stylelint-stylistic": "^0.4.2",
|
"stylelint-stylistic": "^0.4.2",
|
||||||
"supertest": "^6.3.3"
|
"supertest": "^6.3.3"
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const Marked = require('marked');
|
const Marked = require('marked');
|
||||||
const MarkedExtendedTables = require('marked-extended-tables');
|
const MarkedExtendedTables = require('marked-extended-tables');
|
||||||
|
const { markedSmartypantsLite: MarkedSmartypantsLite } = require('marked-smartypants-lite');
|
||||||
const { gfmHeadingId: MarkedGFMHeadingId } = require('marked-gfm-heading-id');
|
const { gfmHeadingId: MarkedGFMHeadingId } = require('marked-gfm-heading-id');
|
||||||
const renderer = new Marked.Renderer();
|
const renderer = new Marked.Renderer();
|
||||||
|
|
||||||
@@ -237,49 +238,10 @@ const definitionLists = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const MarkedSmartyPantsLite = ()=>{
|
|
||||||
return {
|
|
||||||
tokenizer : {
|
|
||||||
inlineText(src) {
|
|
||||||
// don't escape inlineText
|
|
||||||
const cap = this.rules.inline.text.exec(src);
|
|
||||||
|
|
||||||
/* istanbul ignore next */
|
|
||||||
if(!cap) {
|
|
||||||
// should never happen
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const text = cap[0]
|
|
||||||
// em-dashes
|
|
||||||
.replace(/---/g, '\u2014')
|
|
||||||
// en-dashes
|
|
||||||
.replace(/--/g, '\u2013')
|
|
||||||
// opening singles
|
|
||||||
.replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
|
|
||||||
// closing singles & apostrophes
|
|
||||||
.replace(/'/g, '\u2019')
|
|
||||||
// opening doubles
|
|
||||||
.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
|
|
||||||
// closing doubles
|
|
||||||
.replace(/"/g, '\u201d')
|
|
||||||
// ellipses
|
|
||||||
.replace(/\.{3}/g, '\u2026');
|
|
||||||
|
|
||||||
return {
|
|
||||||
type : 'text',
|
|
||||||
raw : cap[0],
|
|
||||||
text : text
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] });
|
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] });
|
||||||
Marked.use(mustacheInjectBlock);
|
Marked.use(mustacheInjectBlock);
|
||||||
Marked.use({ renderer: renderer, mangle: false });
|
Marked.use({ renderer: renderer, mangle: false });
|
||||||
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartyPantsLite());
|
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite());
|
||||||
|
|
||||||
//Fix local links in the Preview iFrame to link inside the frame
|
//Fix local links in the Preview iFrame to link inside the frame
|
||||||
renderer.link = function (href, title, text) {
|
renderer.link = function (href, title, text) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const Markdown = require('naturalcrit/markdown.js');
|
|||||||
test('Escapes <script> tag', function() {
|
test('Escapes <script> tag', function() {
|
||||||
const source = '<script></script>';
|
const source = '<script></script>';
|
||||||
const rendered = Markdown.render(source);
|
const rendered = Markdown.render(source);
|
||||||
expect(rendered).toMatch('<script></script>');
|
expect(rendered).toMatch('<p><script></script></p>\n');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Processes the markdown within an HTML block if its just a class wrapper', function() {
|
test('Processes the markdown within an HTML block if its just a class wrapper', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user