mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-06-22 00:38:38 +00:00
@@ -86,8 +86,8 @@ export function tokenizeCustomMarkdown(text) {
|
||||
if(/\~/.test(lineText)) {
|
||||
const strikethroughRegex = /~(?!\s)(.+?)(?<!\s)~/g;
|
||||
|
||||
let match = strikethroughRegex.exec(lineText);
|
||||
let type = customTags.strikethrough;
|
||||
const match = strikethroughRegex.exec(lineText);
|
||||
const type = customTags.strikethrough;
|
||||
|
||||
if(match) {
|
||||
tokens.push({
|
||||
|
||||
@@ -37,11 +37,9 @@ const wrapSelection = (prefix, suffix) => (view) => {
|
||||
|
||||
let text;
|
||||
|
||||
if(from === to) { text = prefix + suffix }
|
||||
else if(selected.startsWith(prefix) && selected.endsWith(suffix)) {
|
||||
if(from === to) { text = prefix + suffix; } else if(selected.startsWith(prefix) && selected.endsWith(suffix)) {
|
||||
text = selected.slice(prefix.length, -suffix.length);
|
||||
}
|
||||
else {text = `${prefix}${selected}${suffix}`}
|
||||
} else {text = `${prefix}${selected}${suffix}`;}
|
||||
|
||||
changes.push({ from, to, insert: text });
|
||||
}
|
||||
|
||||
@@ -30,8 +30,7 @@ import cm5Themes from 'codemirror-5-themes';
|
||||
const themes = { default: defaultCM5Theme, ...cm5Themes, darkbrewery };
|
||||
|
||||
const themeNames = Object.entries(themes)
|
||||
.filter(([name, value]) =>
|
||||
Array.isArray(value) &&
|
||||
.filter(([name, value])=>Array.isArray(value) &&
|
||||
!name.endsWith('Init') &&
|
||||
!name.endsWith('Style')
|
||||
)
|
||||
@@ -40,7 +39,7 @@ const themeNames = Object.entries(themes)
|
||||
const EditorThemes = [
|
||||
'default',
|
||||
...themeNames
|
||||
.filter(name => name !== 'default')
|
||||
.filter((name)=>name !== 'default')
|
||||
.sort((a, b)=>a.localeCompare(b))
|
||||
];
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ const migrateSystemsToTags = (brew) => {
|
||||
'3.5e' : 'system:D&D 3.5e',
|
||||
'Pathfinder' : 'system:Pathfinder 2e'
|
||||
};
|
||||
const systemTags = brew.systems.map(s => systemMap[s]);
|
||||
const systemTags = brew.systems.map((s)=>systemMap[s]);
|
||||
brew.tags = _.uniq([...(brew.tags || []), ...systemTags]);
|
||||
|
||||
brew.systems = undefined;
|
||||
|
||||
@@ -17,16 +17,16 @@ export default {
|
||||
const styles = ()=>{
|
||||
switch (side) {
|
||||
case 'bottom':
|
||||
return `{width:100%,bottom:0%}`
|
||||
return `{width:100%,bottom:0%}`;
|
||||
break;
|
||||
case 'top':
|
||||
return `{width:100%,top:0%}`
|
||||
return `{width:100%,top:0%}`;
|
||||
break;
|
||||
default:
|
||||
return `{height:100%}`
|
||||
return `{height:100%}`;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const rotation = {
|
||||
'bottom' : 0,
|
||||
|
||||
Reference in New Issue
Block a user