* fix: change callout metadata regex to include non-letter characters
* fix: make metadata regex non-greedy
This allows for users to have callouts such as
> [!NOTE|left foo-bar 123] a ]+ title with square brackets [s] a
> Contents
* fix(wikilinks): handle wikilinks inside tables seperately from other wikilinks
* Prettier
* Cleaned up duplicate code
* Remove test logging
* Refactored and fixed for non-aliased wikilinks inside table
* Updated naming and comments
* Updated comment of wikilink regex
* Updated regex to match previous formatting
* Match table even if EOF is immediately after the table.
* Update quartz/plugins/transformers/ofm.ts
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* Change table escape replace to non-regex version
* Prettier
* Prettier
---------
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* fix: wikiLink in table
- update regexp to make '\' to group in alias
- handle alias using block_id
* style: format with prettier
* style: add comment for block_ref(without alias) in table
---------
Co-authored-by: hulinjiang <hulinjiang@58.com>
* feat(ofm): parsing all type of arrow
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
* fix: use html value instead of decimal
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
* fix: skip parsing arrow if it is not a valid supported mapping
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
---------
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
When providing an absolute path to the content directory (e.g. when using an Obsidian Vault in another directory), the build step would fail with
Failed to process `/absolute/path/to/file.md`: ENOENT: no such file or directory, stat '/current/working/directory/absolute/path/'
This problem originated in the `CreatedModifiedDate` transformer which tries to construct a native filesystem path to the file to call `fs.stat` on. It did not however, account for the original file path contained in the received `VFile` being an absolute path and so, just concatenated the current working directory with the absolute path producing a nonexistent one.
This patch adds a simple fix for this issue by checking if the original file path is already absolute before concatenating with the current working directory.
* Add icons as masks
To handle a simple way to add custom icons, i made it pure css. Icon are now a mask for the callout-icon div, so they always follow the --color form the current callout.
Now to add a custom icon, you simply add
```css
.callout {
&[data-callout="custom"] {
--color: #customcolor;
--border: #custombordercolor;
--bg: #custombg;
--callout-icon: url('data:image/svg+xml; utf8, <custom formatted svg>');
}
```
to custom.scss
* remove now unused code
* Make callouts an enum
* docs: update instructions for custom callouts
* Prettier & run format
* dynamic matching
For maintainability, make dynamic mathching. If we or Obsidian want to support more callouts, we simply add it to the enum
* callout mapping const
Getting ride of the enum entierly as it's not worth here?
* fix callout icon styling
* Add forgotten icons
* Rebase
* harmonize callout icon and fold icon
* fix docs + prettier
* Update docs/features/callouts.md
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* Update quartz/plugins/transformers/ofm.ts
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* Suggestions fix
* remove unecessary rules
* comment is always nice
* Update docs/features/callouts.md
---------
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* fix: alt error mix with height/width
More granular detection of alt and resize in image
* fix: format
* feat: allow to translate the date displayed
* style: format
* fix: rename to fusion dateLocale with locale (i18n support)
* Update quartz/components/PageList.tsx
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
* remove default key as it was already set
* add docstring for locale
---------
Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>