Skip to content

Commit

Permalink
delete useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
lijyze committed Jun 5, 2022
1 parent 87a594a commit 7d499b6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,6 @@ export default class ObsidianAdvancedCodeblockPlugin extends Plugin {
// Handle every code blocks
this.registerMarkdownPostProcessor((element, context) => {
commonCodeblockPostProcessor(element, context, this.app);
// element.querySelectorAll('code').forEach((code) => {
// code.replaceChildren('hello!')
// })
// element.querySelector('code')?.createSpan({text: 'hello!'}) no

element.querySelector('code')?.appendText('method1');
element.querySelectorAll('code').forEach((code) => {
// const temp = document.createElement('span');
// temp.appendText('test');

code.appendText('method2')
})

const code = element.querySelector('code');
if (code) {
[code].forEach((code) => {
// const temp = document.createElement('span');
// temp.appendText('test');

code.appendText('method3')
})
}
});
}

Expand Down

0 comments on commit 7d499b6

Please sign in to comment.