kotaindah55
f2302aa30d
build: move all sub-tokenizer to the tokenizer-components
2025-03-04 16:56:45 +02:00
kotaindah55
ccf98a0fe6
refactor: redefine the token enums
2025-03-04 16:54:21 +02:00
kotaindah55
e3768833c2
refactor: rename SettingOpt1 to MarkdownViewMode
2025-03-04 16:52:24 +02:00
kotaindah55
0da3126283
refactor: move all the format constants to Format.ts
2025-03-04 16:51:23 +02:00
kotaindah55
48fa008223
refactor: separate the rules besed on the token level
2025-03-04 16:50:30 +02:00
kotaindah55
a9c836cd35
feat: assign blkStart at the initialization
2025-02-08 22:45:02 +02:00
kotaindah55
212e4d5789
style: change "nextLine" to "advanceLine"
...
"advanceLine" is more explanatory and distiguishable term than "nextLine". Others might think that "nextLine" is a getter or property.
2025-02-08 22:38:23 +02:00
kotaindah55
1304dbf8de
refactor: attach isBlankLine fn to ParserState.isBlankLine
2025-02-08 22:30:20 +02:00
kotaindah55
2eceea7268
feat: add blkStart property to the ParserState
...
Used to state that the current line is a block start.
2025-02-08 22:28:45 +02:00
kotaindah55
46fc4b0518
feat: add helper to check that the line is blank
2025-02-08 22:26:44 +02:00
kotaindah55
4b6c2a5159
feat: add helper to check that the line is blank
2025-02-08 22:26:03 +02:00
kotaindah55
57d5b9db37
style: change "gOffset" to "globalOffset"
2025-02-08 21:56:49 +02:00
kotaindah55
24a5c8ba59
fix: add syntax functionality in live-preview table
2025-02-07 08:58:47 +02:00
kotaindah55
c817d7af5e
refactor: add "./appFacet" in index.ts
2025-02-06 21:40:26 +02:00
kotaindah55
e603637b1b
style: add parenthesis
2025-02-06 21:39:54 +02:00
kotaindah55
9f0b32a2b3
fix: treat wikilink as a skipped node
2025-02-06 21:39:20 +02:00
kotaindah55
e7d57e7cec
feat: add CharPos type
2025-02-06 21:38:38 +02:00
kotaindah55
048b8f5efa
fix: no longer parse the entire text on a big file
2025-02-06 21:36:16 +02:00
kotaindah55
58745b2835
fix: fix decorator issue when facing big text
2025-02-06 21:34:33 +02:00
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
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
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
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
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