mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 02:42:43 +00:00
Merge branch 'master' of https://github.com/naturalcrit/homebrewery into localSnippetEditor
This commit is contained in:
@@ -186,7 +186,7 @@ const BrewRenderer = (props)=>{
|
|||||||
} else {
|
} else {
|
||||||
if(pageText.startsWith('\\page')) {
|
if(pageText.startsWith('\\page')) {
|
||||||
const firstLineTokens = Markdown.marked.lexer(pageText.split('\n', 1)[0])[0].tokens;
|
const firstLineTokens = Markdown.marked.lexer(pageText.split('\n', 1)[0])[0].tokens;
|
||||||
const injectedTags = firstLineTokens.find((obj)=>obj.injectedTags !== undefined)?.injectedTags;
|
const injectedTags = firstLineTokens?.find((obj)=>obj.injectedTags !== undefined)?.injectedTags;
|
||||||
if(injectedTags) {
|
if(injectedTags) {
|
||||||
styles = { ...styles, ...injectedTags.styles };
|
styles = { ...styles, ...injectedTags.styles };
|
||||||
styles = _.mapKeys(styles, (v, k)=>k.startsWith('--') ? k : _.camelCase(k)); // Convert CSS to camelCase for React
|
styles = _.mapKeys(styles, (v, k)=>k.startsWith('--') ? k : _.camelCase(k)); // Convert CSS to camelCase for React
|
||||||
|
|||||||
22
package.json
22
package.json
@@ -84,11 +84,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.26.9",
|
"@babel/core": "^7.26.10",
|
||||||
"@babel/plugin-transform-runtime": "^7.26.9",
|
"@babel/plugin-transform-runtime": "^7.26.10",
|
||||||
"@babel/preset-env": "^7.26.9",
|
"@babel/preset-env": "^7.26.9",
|
||||||
"@babel/preset-react": "^7.26.3",
|
"@babel/preset-react": "^7.26.3",
|
||||||
"@googleapis/drive": "^8.16.0",
|
"@googleapis/drive": "^11.0.0",
|
||||||
"body-parser": "^1.20.2",
|
"body-parser": "^1.20.2",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
"codemirror": "^5.65.6",
|
"codemirror": "^5.65.6",
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
"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": "14.0.0",
|
"marked": "15.0.0",
|
||||||
"marked-emoji": "^2.0.0",
|
"marked-emoji": "^2.0.0",
|
||||||
"marked-extended-tables": "^2.0.1",
|
"marked-extended-tables": "^2.0.1",
|
||||||
"marked-gfm-heading-id": "^4.0.1",
|
"marked-gfm-heading-id": "^4.0.1",
|
||||||
@@ -115,21 +115,21 @@
|
|||||||
"marked-subsuper-text": "^1.0.3",
|
"marked-subsuper-text": "^1.0.3",
|
||||||
"markedLegacy": "npm:marked@^0.3.19",
|
"markedLegacy": "npm:marked@^0.3.19",
|
||||||
"moment": "^2.30.1",
|
"moment": "^2.30.1",
|
||||||
"mongoose": "^8.12.1",
|
"mongoose": "^8.13.0",
|
||||||
"nanoid": "5.1.3",
|
"nanoid": "5.1.5",
|
||||||
"nconf": "^0.12.1",
|
"nconf": "^0.12.1",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-frame-component": "^4.1.3",
|
"react-frame-component": "^4.1.3",
|
||||||
"react-router": "^7.3.0",
|
"react-router": "^7.4.0",
|
||||||
"sanitize-filename": "1.6.3",
|
"sanitize-filename": "1.6.3",
|
||||||
"superagent": "^10.1.1",
|
"superagent": "^10.2.0",
|
||||||
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
|
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@stylistic/stylelint-plugin": "^3.1.2",
|
"@stylistic/stylelint-plugin": "^3.1.2",
|
||||||
"babel-plugin-transform-import-meta": "^2.3.2",
|
"babel-plugin-transform-import-meta": "^2.3.2",
|
||||||
"eslint": "^9.22.0",
|
"eslint": "^9.23.0",
|
||||||
"eslint-plugin-jest": "^28.11.0",
|
"eslint-plugin-jest": "^28.11.0",
|
||||||
"eslint-plugin-react": "^7.37.4",
|
"eslint-plugin-react": "^7.37.4",
|
||||||
"globals": "^16.0.0",
|
"globals": "^16.0.0",
|
||||||
@@ -137,9 +137,9 @@
|
|||||||
"jest-expect-message": "^1.1.3",
|
"jest-expect-message": "^1.1.3",
|
||||||
"jsdom-global": "^3.0.2",
|
"jsdom-global": "^3.0.2",
|
||||||
"postcss-less": "^6.0.0",
|
"postcss-less": "^6.0.0",
|
||||||
"stylelint": "^16.16.0",
|
"stylelint": "^16.17.0",
|
||||||
"stylelint-config-recess-order": "^6.0.0",
|
"stylelint-config-recess-order": "^6.0.0",
|
||||||
"stylelint-config-recommended": "^15.0.0",
|
"stylelint-config-recommended": "^15.0.0",
|
||||||
"supertest": "^7.0.0"
|
"supertest": "^7.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ renderer.link = function (token) {
|
|||||||
}
|
}
|
||||||
let out = `<a href="${escape(href)}"`;
|
let out = `<a href="${escape(href)}"`;
|
||||||
if(title) {
|
if(title) {
|
||||||
out += ` title="${title}"`;
|
out += ` title="${escape(title)}"`;
|
||||||
}
|
}
|
||||||
if(self) {
|
if(self) {
|
||||||
out += ' target="_self"';
|
out += ' target="_self"';
|
||||||
|
|||||||
@@ -54,19 +54,19 @@ describe('Non-Breaking Spaces', ()=>{
|
|||||||
test('I am actually a single-line definition list!', function() {
|
test('I am actually a single-line definition list!', function() {
|
||||||
const source = 'Term ::> Definition 1\n';
|
const source = 'Term ::> Definition 1\n';
|
||||||
const rendered = Markdown.render(source).trim();
|
const rendered = Markdown.render(source).trim();
|
||||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt><dd>> Definition 1</dd>\n</dl>`);
|
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt><dd>> Definition 1</dd>\n</dl>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('I am actually a definition list!', function() {
|
test('I am actually a definition list!', function() {
|
||||||
const source = 'Term\n::> Definition 1\n';
|
const source = 'Term\n::> Definition 1\n';
|
||||||
const rendered = Markdown.render(source).trim();
|
const rendered = Markdown.render(source).trim();
|
||||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt>\n<dd>> Definition 1</dd></dl>`);
|
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt>\n<dd>> Definition 1</dd></dl>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('I am actually a two-term definition list!', function() {
|
test('I am actually a two-term definition list!', function() {
|
||||||
const source = 'Term\n::> Definition 1\n::>> Definition 2';
|
const source = 'Term\n::> Definition 1\n::>> Definition 2';
|
||||||
const rendered = Markdown.render(source).trim();
|
const rendered = Markdown.render(source).trim();
|
||||||
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt>\n<dd>> Definition 1</dd>\n<dd>>> Definition 2</dd></dl>`);
|
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<dl><dt>Term</dt>\n<dd>> Definition 1</dd>\n<dd>>> Definition 2</dd></dl>`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user