safe wiederherstellen von verlorenem
This commit is contained in:
parent
21a5b02325
commit
dcc9477f8e
|
@ -883,9 +883,9 @@
|
|||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
|
||||
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
|
||||
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
|
@ -1090,9 +1090,9 @@
|
|||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -17,8 +17,6 @@ import {
|
|||
StateEffect
|
||||
} from '@codemirror/state';
|
||||
|
||||
import { syntaxTree } from '@codemirror/language';
|
||||
|
||||
const LawRefMatcher = new MatchDecorator({
|
||||
regexp: /\(\((\w+)\)\)/g,
|
||||
decoration: match => Decoration.mark({
|
||||
|
@ -38,13 +36,13 @@ class LawRefPluginEditorProcessor implements PluginValue {
|
|||
decorations: DecorationSet;
|
||||
constructor(view: EditorView) {
|
||||
this.decorations = LawRefMatcher.createDeco(view);
|
||||
console.log("halloooo")
|
||||
//console.log("halloooo")
|
||||
}
|
||||
|
||||
update(update: ViewUpdate) {
|
||||
if (update.docChanged || update.viewportChanged) {
|
||||
this.decorations = LawRefMatcher.updateDeco(update, this.decorations);
|
||||
console.log("elllooooo")
|
||||
//console.log("elllooooo")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ export class ExampleView extends ItemView {
|
|||
}
|
||||
|
||||
async onOpen() {
|
||||
console.log(this.containerEl);
|
||||
console.log("Example view opened");
|
||||
const container = this.containerEl.children[1];
|
||||
container.empty();
|
||||
container.createEl("h2", { text: "Gesetzesauszüge" });
|
||||
|
|
|
@ -80,7 +80,7 @@ export default class LawSuggester extends EditorSuggest<OldpSearchResponseItem>
|
|||
if (!this.context) return;
|
||||
|
||||
const { start, end } = this.context;
|
||||
console.log('suggestion', suggestion);
|
||||
//console.log('suggestion', suggestion);
|
||||
// keep space at the end for hyper link
|
||||
const linkEl = `[${suggestion.title}](${suggestion.link}) `;
|
||||
this.context.editor.replaceRange(linkEl, start, end);
|
||||
|
|
12
src/main.ts
12
src/main.ts
|
@ -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.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)
|
||||
// Using this function will automatically remove the event listener when this plugin is disabled.
|
||||
this.app.workspace.onLayoutReady(() => {this.activateView()});
|
||||
|
||||
/** 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) => {
|
||||
console.log('click', evt);
|
||||
});
|
||||
}); */
|
||||
|
||||
const ribbonIconEl = this.addRibbonIcon('dice', 'Sample Plugin', (evt: MouseEvent) => {
|
||||
// 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.
|
||||
this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000));
|
||||
//this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000));
|
||||
|
||||
// register suggestor on § key
|
||||
if (this.settings.useSuggester===true){
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -290,9 +290,9 @@ asynckit@^0.4.0:
|
|||
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
||||
|
||||
axios@^1.7.2:
|
||||
version "1.7.7"
|
||||
resolved "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz"
|
||||
integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==
|
||||
version "1.9.0"
|
||||
resolved "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz"
|
||||
integrity sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==
|
||||
dependencies:
|
||||
follow-redirects "^1.15.6"
|
||||
form-data "^4.0.0"
|
||||
|
@ -417,9 +417,9 @@ core-util-is@~1.0.0:
|
|||
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
||||
|
||||
cross-spawn@^7.0.2:
|
||||
version "7.0.3"
|
||||
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
|
||||
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
||||
version "7.0.6"
|
||||
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz"
|
||||
integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
|
||||
dependencies:
|
||||
path-key "^3.1.0"
|
||||
shebang-command "^2.0.0"
|
||||
|
|
Loading…
Reference in New Issue