GuavaCZ / filament-knowledge-base

MIT License
137 stars 21 forks source link

[Bug]: Format Issue #43

Closed markwillow closed 3 months ago

markwillow commented 3 months ago

What happened?

Hi @lukas-frey,

I recently noticed that the commonmark is not working as it is.

Here's the output inside the app: image

Even the code is:

# code block
print '3 backticks or'
print 'indent 4 spaces'

Here's my composer file and let me know if there's a plugin that causes it:

"php": "^8.1", "blade-ui-kit/blade-icons": "^1.5", "calebporzio/sushi": "^2.5", "doctrine/dbal": "^3.7", "eightynine/filament-excel-import": "^3.0", "filament/filament": "^3.2-stable", "guava/filament-knowledge-base": "^1.9", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/horizon": "^5.22", "laravel/octane": "^2.0", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "league/commonmark": "^2.5", "livewire/livewire": "^3.0@beta", "n0sz/commonmark-marker-extension": "^1.0", "pxlrbt/filament-excel": "^2.3", "sentry/sentry-laravel": "^3.6", "spatie/laravel-activitylog": "^4.7", "spatie/laravel-data": "^3.6", "spatie/laravel-google-cloud-storage": "^2.3", "spatie/laravel-package-tools": "^1.16", "spatie/laravel-permission": "^5.10", "spatie/php-structure-discoverer": "^2.1", "spatie/shiki-php": "^2.0", "symfony/yaml": "^7.1", "tapp/filament-timezone-field": "^3.0"

How to reproduce the bug

"php": "^8.1", "blade-ui-kit/blade-icons": "^1.5", "calebporzio/sushi": "^2.5", "doctrine/dbal": "^3.7", "eightynine/filament-excel-import": "^3.0", "filament/filament": "^3.2-stable", "guava/filament-knowledge-base": "^1.9", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/horizon": "^5.22", "laravel/octane": "^2.0", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "league/commonmark": "^2.5", "livewire/livewire": "^3.0@beta", "n0sz/commonmark-marker-extension": "^1.0", "pxlrbt/filament-excel": "^2.3", "sentry/sentry-laravel": "^3.6", "spatie/laravel-activitylog": "^4.7", "spatie/laravel-data": "^3.6", "spatie/laravel-google-cloud-storage": "^2.3", "spatie/laravel-package-tools": "^1.16", "spatie/laravel-permission": "^5.10", "spatie/php-structure-discoverer": "^2.1", "spatie/shiki-php": "^2.0", "symfony/yaml": "^7.1", "tapp/filament-timezone-field": "^3.0"

Package Version

1.9.2

PHP Version

8.1

Laravel Version

10.10

Which operating systems does with happen with?

macOS

Notes

No response

lukas-frey commented 3 months ago

What's not working?

markwillow commented 3 months ago

Most of the feature from commonmark. For example:

``` # code block \print '3 backticks or' \print 'indent 4 spaces' ```

lukas-frey commented 3 months ago

I see. Did you follow the documentation here https://github.com/GuavaCZ/filament-knowledge-base#syntax-highlighting ?

Did you install shiki npm package and shiki-php, enable syntax highlighting?

markwillow commented 3 months ago

The highlighting works, but other stuff doesn't.

markwillow commented 3 months ago

I'll give you examples: This is the output of my code:

image

However, this is the actual code:

image

Basically, instead of creating a number automatically, I need to manually input them.

lukas-frey commented 3 months ago

Oh I see, yeah, lists seem to lack formatting. Thanks for the info. Will fix it in the next release.

markwillow commented 3 months ago

Thanks. Hahahaha. I may encounter lots since we will be officially using this one. Hope that you'll be able to convert this to mySQL.

lukas-frey commented 3 months ago

Yeah, just create an issue if you encounter something. What are you working on?

What do you mean by MySQL? Storing the MD inside the database?

That's a planned feature, but I currently do not have much free time on my plate to work on it. PRs are welcome, though.

lukas-frey commented 3 months ago

Ordered/Unordered list formatting has been fixed.