Commit graph

231 commits

Author SHA1 Message Date
kotaindah55
eb817cb46a refactor: ILine is now inheritance class of Line 2025-04-18 15:39:48 +02:00
kotaindah55
1d9ba1db14 refactor: ILine is now inheritance class of Line 2025-04-18 15:39:25 +02:00
kotaindah55
af6350b898 fix: tags arrangement doesn't properly work 2025-04-18 15:38:12 +02:00
kotaindah55
9c424d9a51 refactor: token index cache no longer needed 2025-04-18 15:36:49 +02:00
kotaindah55
fcce761c21 perf: split token group virtually into smaller parts
In the case of finding certain token index, we split up the token groups into smaller parts to speed up the process.
2025-04-18 15:35:53 +02:00
kotaindah55
83b1cd24a6 perf: reduce parsing frequency
For now on, parser only parses when the provided tree was fully completed at certain length.
2025-04-18 15:30:18 +02:00
kotaindah55
65a3cf99cf feat: add languageStateField hooker 2025-04-13 12:06:12 +02:00
kotaindah55
7ab1aee784 refactor: store old tree to the parser
Rather than pulling out the old tree from the previous state while in updating process, parser will store previous processed tree as an old tree. It also ensures that the old tree is exactly a completed tree.
2025-04-13 12:05:38 +02:00
kotaindah55
f3d3777567 refactor: store made changes before start parsing
There is possibility that the current tree has not been completed yet, while the doc has been changed.
2025-04-13 12:01:36 +02:00
kotaindah55
bbdd8523aa feat: add Writable type utility 2025-04-13 11:59:01 +02:00
kotaindah55
c2b47a6df0 refactor: add CodeMirror attribution for its internal API 2025-04-13 11:58:36 +02:00
kotaindah55
f46c104879 refactor: rename "cm-extension" to "cm-extensions" 2025-04-13 11:57:44 +02:00
kotaindah55
87788eb6d5 perf: only do reparsing when the tree was completed
Additionally, A logic was added to only reparse when needed.
2025-04-13 11:56:19 +02:00
kotaindah55
ac2ba4d794 fix: remove address parts where their parent has been changed
We should use `splice` instead of reassigning them due to possibility of having different address length on different line.
2025-04-13 11:33:43 +02:00
kotaindah55
541a322c68 chore: bump to 2.0.9 2025-04-08 16:10:19 +02:00
kotaindah55
535f3654e8 fix: repair postprocessor not parse note embeds, heading, etc
Also add support to parse exported note by Export Image plugin.
2025-04-08 16:07:57 +02:00
kotaindah55
d49255af42 feat: set higher precedence to the postprocessor 2025-04-08 16:03:53 +02:00
kotaindah55
4ddf274b8e chore: bump to 2.0.8 2025-04-07 04:29:10 +02:00
kotaindah55
d160a6b771 chore: include package.json in the version bump 2025-04-07 04:28:27 +02:00
kotaindah55
31c75bd532 chore: add keyword "obsidian-plugin" to package.json 2025-04-07 04:26:14 +02:00
kotaindah55
54c0ec3c45 fix: mistake of advancing line via Text.line() instead of TextCursor.next()
This leads RangeError when parser skips the blank line.
2025-04-07 03:28:33 +02:00
kotaindah55
77620ebe89 refactor(TextCursor): translate Text's "address" after address change loop has been finished 2025-04-07 03:24:59 +02:00
kotaindah55
f7c172fab8 chore: bump to 2.0.7 2025-04-06 23:02:22 +02:00
kotaindah55
764c856b4d chore: remove unnecessary dependencies 2025-04-06 23:01:55 +02:00
kotaindah55
a448ff7ffe style: use tabs instead of spaces 2025-04-06 23:00:52 +02:00
kotaindah55
18b9e0f8f3 refactor: reorganize source codes
Most of the codes were organized, with the addition of replacing spaces with tabs, removing unused functions and snippets, etc.
2025-04-06 23:00:24 +02:00
kotaindah55
4f5e62bc0a feat: use TagManager instance to manage all custom tags 2025-04-06 22:56:49 +02:00
kotaindah55
95f061ae6f chore: add .editorconfig file 2025-04-06 22:56:02 +02:00
kotaindah55
f436df2c0d chore: migrating to MIT License 2025-04-06 22:23:11 +02:00
kotaindah55
ea97f16b55 chore: migrating to MIT License 2025-04-06 22:22:39 +02:00
kotaindah55
af3c3c05da perf: empty containerEl on tab hide instead on display beginning
Thus, it ensure there is no persist and remain unused element in the background.
2025-03-20 20:54:16 +02:00
kotaindah55
cf7906e851 chore: bump version to 2.0.6 2025-03-20 16:55:25 +02:00
kotaindah55
a648055356 refactor: rename TokensCatcher to TokensBuffer 2025-03-20 16:45:43 +02:00
kotaindah55
92830cafab fix(parser): error when encounter math syntax in a blockquote
This happen when getShifterStart() was trying to get math open inside a blockquote. Normally, getOpen() method in the ShifterNodeConfigs will recursively look for any of shifter node behind, using node.prevSibling prop to catch it. It doesn't result null value, except for the mentioned case above. So, we need to track the parent firstly, in this case it's a blockquote node, then get the previous sibling (it's blockquote too) and pick its last child (which is another math node).
2025-03-20 16:37:53 +02:00
kotaindah55
17d3c9ce34 chore: bump to 2.0.5 2025-03-18 15:21:53 +02:00
kotaindah55
c3029db6d7 docs: add latest features explanation 2025-03-18 15:20:01 +02:00
kotaindah55
3bcb491d22 docs: move "Syntax Rules" section to separate md 2025-03-18 15:19:32 +02:00
kotaindah55
23e0d87546 revert: use wrap() back as it providing detectWord option 2025-03-17 23:30:32 +02:00
kotaindah55
75ec4828cd refactor: rename toggleDelim() to toggleInlineDelim 2025-03-17 23:29:32 +02:00
kotaindah55
0c9a316cca refactor: add detectWord parameter to the wrap()
The value should be true when tidier formatting was switched on.
2025-03-17 23:28:42 +02:00
kotaindah55
cbff48de5a fix: non-tidier format acts like the tidier one
This was fixed by not using wrap() to wrap with delimiters.
2025-03-17 23:17:58 +02:00
kotaindah55
25771e6600 revert: rebump to 2.0.4
Fix #8 issue. Don't make new version while it has not been released yet.
2025-03-17 21:23:01 +02:00
kotaindah55
dd3ab6eb7a refactor: reorganize folders and files 2025-03-17 11:14:27 +02:00
kotaindah55
841ab04b78 refactor: add some types as helper to the core functionality 2025-03-17 11:12:52 +02:00
kotaindah55
fbc9b8e0d6 chore: update tag menu style rules 2025-03-17 11:11:02 +02:00
kotaindah55
e2dc6b39e7 chore: update builtin-modules to 5.0.0 2025-03-17 11:09:36 +02:00
kotaindah55
c2bb8a67d2 feat: register formatting commands and context menu 2025-03-17 11:09:01 +02:00
kotaindah55
33e80fe525 feat: add settings to customize predefined tags for the custom span and fenced div 2025-03-17 11:06:37 +02:00
kotaindah55
f54b8b831b feat: use TagMenu to cover all tag-based formatting
Additionally, ColorMenu has to be removed, and use Formatter directly rather than caching some token informations to the menu.
2025-03-17 10:41:52 +02:00
kotaindah55
cf701cad4d perf: ColorButton no longer held token ranges information
All of this can be done with Formatter instance through menu item onClick event.
2025-03-17 10:38:26 +02:00