Commit graph

94 commits

Author SHA1 Message Date
kotaindah55
1de32ca303 feat: add CharPos type 2025-02-06 21:32:11 +02:00
kotaindah55
240c86b620 refactor: remove unused this.color property 2025-02-06 21:31:15 +02:00
kotaindah55
5106b8147e refactor: separate between color tag and menu item's name 2025-02-06 21:30:44 +02:00
kotaindah55
c8ab1273bf feat: extend plugin with facet storing "this.app" 2025-02-06 21:27:46 +02:00
kotaindah55
50a209a589 feat: add ability to remove highlight from colors menu 2025-02-06 21:25:48 +02:00
kotaindah55
1ff4d008e5 style: remove redundant comment 2025-02-06 21:21:18 +02:00
kotaindah55
c0b5763d07 chore: remove unused css rule 2025-02-06 21:19:40 +02:00
kotaindah55
f6c52d8ddc style: remove "cm" from color menu class 2025-02-06 21:19:05 +02:00
kotaindah55
30b6807abd style: remove "cm" from menu class 2025-02-06 21:18:35 +02:00
kotaindah55
21b7122819 style: use more explicit identifier 2025-02-06 21:16:41 +02:00
kotaindah55
2179ac5249 fix: pass 8 as "startWith" second parameter
I forgot to pass 8 as the second parameter of startWith method when qualify nodeName string. Because, it lead to proper context analysis. 8 is the length of "HyperMD-" string. It's written as the start name of each line that is treated as "block element", such us list, heading, and so on.

That string ("HyperMD-") is followed by one of block types. From that point, if you want to get the block type with startWith method (by immediately typing its block type like "list"), you have to pass the offset number, which is that length above. Otherwise, you get nothing but false return, not because of no type either, but because you are facing "HyperMD-" string.
2025-02-05 22:25:17 +02:00
kotaindah55
a6e3c953f7 chore: add eslint dependency 2025-02-05 18:10:17 +02:00
kotaindah55
69eba9ee02 chore: migrate to higher version 2025-02-05 17:56:04 +02:00
kotaindah55
6950fdbf0a chore: migrate to 2.0.0 2025-02-05 17:35:02 +02:00
kotaindah55
1a7828e5ca refactor: use Notice instead of Setting.setDesc 2025-02-05 17:20:35 +02:00
kotaindah55
6cc89e67e5 fix: fix misspelled colorButton as editorEscape 2025-02-05 17:15:09 +02:00
kotaindah55
33fdc53481 docs: don't use alert with nested blockquote 2025-02-05 17:09:41 +02:00
kotaindah55
2090b3618f docs: move media directory and use few gifs 2025-02-05 17:01:11 +02:00
kotaindah55
d458bada3b docs: use few gifs 2025-02-05 17:00:34 +02:00
kotaindah55
0f008589e1 docs: rename "readme" folder to "docs" 2025-02-05 16:55:01 +02:00
kotaindah55
21b4f95914 fix: fix misspelled colorButton as editorEscape 2025-02-05 16:53:56 +02:00
kotaindah55
e3e9b72e9d fix: don't push empty element to parsing queue
If parser ecounter this element, it will cause infinity loop.
2025-02-05 13:58:12 +02:00
kotaindah55
6902444b08 fix: prevent align decoration from remaining
Fix a bug, when align decoration is located at the first line, deleting it doesn't make it dissapear. Fixing that by adding a condition in the decoSet filter.
2025-02-04 23:46:56 +02:00
kotaindah55
1b77b9d4c0 style: whitespace 2025-02-04 21:57:42 +02:00
kotaindah55
455c0c389d style: change to semicolon 2025-02-04 21:57:11 +02:00
kotaindah55
96038c809b style: use Record instead of using index signature 2025-02-04 21:56:43 +02:00
kotaindah55
5d3c4af06b feat: introduce new ability to disable particular formats
Now, users are able to disable each format paticularly in the settings. Still, users must restart their app to take the effect.
2025-02-04 21:54:54 +02:00
kotaindah55
8cb05ca068 refactor: use createElement instead of createSpan
Use createSpan when having its parent. Otherwise, use built-in method createElement.
2025-02-04 12:10:54 +02:00
kotaindah55
22618ae0e0 fix: use built-in span element for spoiler
Defining custom element on global causing error when reenable the plugin. Hence, using regular span is more appropriate way.
2025-02-04 11:55:52 +02:00
kotaindah55
e371b7904d fix: add another condition for decos set filter
Align line decoration that doesn't covered by filter range, even though it was touching it, should not be filtered out.
2025-02-04 00:14:25 +02:00
kotaindah55
8dca807b37 chore: switch "no-cond-assign" off 2025-02-03 23:41:31 +02:00
kotaindah55
04a88cb15a fix: remove short-circuting when offset is non-zero
Short-circuiting while offset is a non-zero value causes unexpected result when the parser intializes parsing. If it happens, the current context isn't obtained. Hence, tokens that intended to be resolved when facing the end of current line (i.e. due to current context being different with the previous one) may not be resolved.
2025-02-03 23:40:47 +02:00
kotaindah55
f7376eea86 fix: avoid reassigning offset to non-zero value
Provide queue.resolveAll parameter with the intended value, instead of reassigning this.offset.
2025-02-03 23:21:33 +02:00
kotaindah55
6c8ce72baf fix: reassign offset to 0 before resolveContext
resolveContext should be executed once at streamParse before iterating parseLine, or at each nextLine after reassigning this.line to its next and this.offset to 0.
2025-02-03 23:17:48 +02:00
kotaindah55
82fbbbbcbf refactor: remove eslint flag 2025-02-03 23:12:05 +02:00
kotaindah55
ce3769d39a style: prefer "touch" t o "cover"
Tree cursor, that touches the current offset, is stated as "touch" rather than "cover". It is obvious that "cover" means the cursor is covering entire offset, whereas in some cases the offset only touches one of the two cursor edges.
2025-02-03 23:10:33 +02:00
kotaindah55
0e656fef28 refactor: suffice with processCursor at parseLine
processCursor will be executed within parseLine method, precisely it will be executed at the beginning of each parseLine call.
2025-02-03 22:57:47 +02:00
kotaindah55
78cbdfcdaa chore: migrate to node 22.x 2025-02-03 20:56:54 +02:00
kotaindah55
6361c1e520 fix: fix regexp causing strikethrough mess up the parser 2025-02-03 20:51:53 +02:00
kotaindah55
c6cc27a1f9 refactor: avoid using arbitrary RegExp for parsing 2025-02-03 20:30:02 +02:00
kotaindah55
ce6a4e763d refactor: move parserField to separated folder 2025-02-03 20:28:58 +02:00
kotaindah55
251f6f3942 chore: change isDesktopOnly to false 2025-02-03 20:28:01 +02:00
kotaindah55
53cca9b7d8 chore: migrate from eslintrc to eslint.config 2025-02-03 20:26:59 +02:00
kotaindah55
82ee38ee6f chore: minify code when in production 2025-02-03 20:24:15 +02:00
kotaindah55
136c4ceb62 refactor: move all ViewPlugin to editorExtendedSyntax 2025-02-03 20:23:12 +02:00
kotaindah55
ce8a09d07b fix: style doesn't appear correctly 2025-02-03 20:21:46 +02:00
kotaindah55
352892d1a2 refactor: unite all postprocessor to PreviewExtendedSyntax 2025-02-03 20:20:46 +02:00
kotaindah55
9d9148f086 feat: create custom element for spoiler 2025-02-03 20:19:04 +02:00
kotaindah55
8ff1c682d3 feat: enums giving additional informations to token 2025-02-03 20:18:05 +02:00
kotaindah55
683394f9a3 refactor: use Format instead of DelimType 2025-02-03 20:16:49 +02:00