mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 12:00:23 +00:00
fix: add syntax functionality in live-preview table
This commit is contained in:
parent
7a954a3b77
commit
24a5c8ba59
1 changed files with 11 additions and 1 deletions
|
|
@ -15,6 +15,14 @@ export class PreviewExtendedSyntax {
|
|||
private decorate(container: HTMLElement) {
|
||||
let targetedEls = container.querySelectorAll(this.query),
|
||||
parsingQueue: PreviewModeParser[] = [];
|
||||
if (container.classList.contains("table-cell-wrapper")) {
|
||||
new PreviewModeParser(container, parsingQueue).streamParse();
|
||||
for (let i = 0; i < parsingQueue.length; i++) {
|
||||
parsingQueue[i].streamParse();
|
||||
if (i >= 100) { throw Error(`${parsingQueue}`) }
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < targetedEls.length; i++) {
|
||||
new PreviewModeParser(targetedEls[i], parsingQueue).streamParse();
|
||||
for (let i = 0; i < parsingQueue.length; i++) {
|
||||
|
|
@ -26,7 +34,9 @@ export class PreviewExtendedSyntax {
|
|||
}
|
||||
private toBeDecorated(container: HTMLElement) {
|
||||
let firstChild = container.firstElementChild;
|
||||
if (firstChild && (
|
||||
if (
|
||||
container.classList.contains("table-cell-wrapper") ||
|
||||
firstChild && (
|
||||
firstChild instanceof HTMLParagraphElement ||
|
||||
firstChild instanceof HTMLTableElement ||
|
||||
firstChild instanceof HTMLUListElement ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue