Commit graph

35 commits

Author SHA1 Message Date
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
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
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
136c4ceb62 refactor: move all ViewPlugin to editorExtendedSyntax 2025-02-03 20:23:12 +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
kotaindah55
fca8c76503 feat: parse HTML using Range and TreeWalker 2025-02-03 20:15:08 +02:00
kotaindah55
5f5fc5c72d feat: add some configs for parsing 2025-02-03 20:13:41 +02:00
kotaindah55
bf20f09b7e refactor: map and filter decoration sets 2025-02-03 20:12:40 +02:00
kotaindah55
f21990f4b5 refactor: put all format types in one stateField 2025-02-03 19:14:59 +02:00
kotaindah55
fb3d0364a0 refactor: use incremental parse to produce tokens 2025-02-03 19:14:15 +02:00
kotaindah55
36bd68f91e remove this.view 2024-09-27 22:15:53 +03:00
kotaindah55
a3996da372 a few reorganizing 2024-09-27 22:15:31 +03:00
kotaindah55
01796ca76f remove "first-letter" and "last-letter" deco, and increment highlight deco precedence 2024-09-27 22:14:29 +03:00
kotaindah55
b4a6e01717 Relocate file management and remove unused codes 2024-09-27 12:21:27 +03:00
kotaindah55
1772d6649d fixing a small bug on regexps query 2024-09-27 07:30:59 +03:00
kotaindah55
a316a197f9 remove "excludedSelector" 2024-09-27 01:54:58 +03:00
kotaindah55
9df1ea0558 Reapply "change include and target"
This reverts commit 30e903197b.
2024-09-27 01:48:53 +03:00
kotaindah55
30e903197b Revert "change include and target"
This reverts commit 1f70242813.
2024-09-27 01:47:11 +03:00
kotaindah55
1f70242813 change include and target 2024-09-27 01:46:18 +03:00
kotaindah55
5f71025837 change from "getEscapedDelims" to "getDelimCounts" 2024-09-27 01:40:44 +03:00
kotaindah55
eefa267fbb First push 2024-09-25 12:01:47 +03:00