safe wiederherstellen von verlorenem

This commit is contained in:
TheOnlySilas 2025-04-29 14:37:52 +02:00
parent 21a5b02325
commit dcc9477f8e
6 changed files with 23 additions and 23 deletions

12
package-lock.json generated
View File

@ -883,9 +883,9 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.7.7", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
"form-data": "^4.0.0", "form-data": "^4.0.0",
@ -1090,9 +1090,9 @@
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
}, },
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
"version": "7.0.3", "version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {

View File

@ -17,8 +17,6 @@ import {
StateEffect StateEffect
} from '@codemirror/state'; } from '@codemirror/state';
import { syntaxTree } from '@codemirror/language';
const LawRefMatcher = new MatchDecorator({ const LawRefMatcher = new MatchDecorator({
regexp: /\(\((\w+)\)\)/g, regexp: /\(\((\w+)\)\)/g,
decoration: match => Decoration.mark({ decoration: match => Decoration.mark({
@ -38,13 +36,13 @@ class LawRefPluginEditorProcessor implements PluginValue {
decorations: DecorationSet; decorations: DecorationSet;
constructor(view: EditorView) { constructor(view: EditorView) {
this.decorations = LawRefMatcher.createDeco(view); this.decorations = LawRefMatcher.createDeco(view);
console.log("halloooo") //console.log("halloooo")
} }
update(update: ViewUpdate) { update(update: ViewUpdate) {
if (update.docChanged || update.viewportChanged) { if (update.docChanged || update.viewportChanged) {
this.decorations = LawRefMatcher.updateDeco(update, this.decorations); this.decorations = LawRefMatcher.updateDeco(update, this.decorations);
console.log("elllooooo") //console.log("elllooooo")
} }
} }

View File

@ -16,7 +16,7 @@ export class ExampleView extends ItemView {
} }
async onOpen() { async onOpen() {
console.log(this.containerEl); console.log("Example view opened");
const container = this.containerEl.children[1]; const container = this.containerEl.children[1];
container.empty(); container.empty();
container.createEl("h2", { text: "Gesetzesauszüge" }); container.createEl("h2", { text: "Gesetzesauszüge" });

View File

@ -80,7 +80,7 @@ export default class LawSuggester extends EditorSuggest<OldpSearchResponseItem>
if (!this.context) return; if (!this.context) return;
const { start, end } = this.context; const { start, end } = this.context;
console.log('suggestion', suggestion); //console.log('suggestion', suggestion);
// keep space at the end for hyper link // keep space at the end for hyper link
const linkEl = `[${suggestion.title}](${suggestion.link}) `; const linkEl = `[${suggestion.title}](${suggestion.link}) `;
this.context.editor.replaceRange(linkEl, start, end); this.context.editor.replaceRange(linkEl, start, end);

View File

@ -24,20 +24,22 @@ export default class LawRefPlugin extends Plugin {
// This adds a settings tab so the user can configure various aspects of the plugin // This adds a settings tab so the user can configure various aspects of the plugin
this.addSettingTab(new LawRefPluginSettingTab(this.app, this)); this.addSettingTab(new LawRefPluginSettingTab(this.app, this));
// If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin) this.app.workspace.onLayoutReady(() => {this.activateView()});
// Using this function will automatically remove the event listener when this plugin is disabled.
/** If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin)
Using this function will automatically remove the event listener when this plugin is disabled.
this.registerDomEvent(document, 'click', (evt: MouseEvent) => { this.registerDomEvent(document, 'click', (evt: MouseEvent) => {
console.log('click', evt); console.log('click', evt);
}); }); */
const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => { const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => {
// Called when the user clicks the icon. // Called when the user clicks the icon.
this.activateView(); //this.activateView();
}); });
// When registering intervals, this function will automatically clear the interval when the plugin is disabled. // When registering intervals, this function will automatically clear the interval when the plugin is disabled.
this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000)); //this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000));
// register suggestor on § key // register suggestor on § key
if (this.settings.useSuggester===true){ if (this.settings.useSuggester===true){

View File

@ -290,9 +290,9 @@ asynckit@^0.4.0:
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
axios@^1.7.2: axios@^1.7.2:
version "1.7.7" version "1.9.0"
resolved "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz" resolved "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz"
integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== integrity sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==
dependencies: dependencies:
follow-redirects "^1.15.6" follow-redirects "^1.15.6"
form-data "^4.0.0" form-data "^4.0.0"
@ -417,9 +417,9 @@ core-util-is@~1.0.0:
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
cross-spawn@^7.0.2: cross-spawn@^7.0.2:
version "7.0.3" version "7.0.6"
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
dependencies: dependencies:
path-key "^3.1.0" path-key "^3.1.0"
shebang-command "^2.0.0" shebang-command "^2.0.0"