# Discourse markdown plugin error

**URL:** https://meta.discourse.org/t/discourse-markdown-plugin-error/338340
**Category:** Development
**Created:** [November 25, 2024, 10:30pm UTC](https://meta.discourse.org/t/discourse-markdown-plugin-error/338340 "2024-11-25T22:30:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aiong](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@aiong](https://meta.discourse.org/u/aiong)
#### Post date: [November 25, 2024, 10:30pm UTC](https://meta.discourse.org/t/discourse-markdown-plugin-error/338340/1 "2024-11-25T22:30:48Z")

</div>

- Discourse site is chiahpa.be
- I am using a custom plugin for adding ruby text (small letters above Japanese or Chinese characters), using the [GitHub - lostandfound/markdown-it-ruby: Ruby annotation plugin for markdown-it parser. · GitHub](http://github.com/lostandfound/markdown-it-ruby) plugin.
- My plugin is [GitHub - aiongg/discourse-ruby · GitHub](http://github.com/aiongg/discourse-ruby). It worked fine for a few years, but recently started throwing the following error every time someone tries to post:

```plaintext
Started POST "/posts" for 172.17.0.1 at 2024-11-25 22:17:41 +0000
Processing by PostsController#create as JSON
  Parameters: {"raw"=>"updated ruby plugin\n\ntesting ruby:\n\n{汝|lí}{好|hó}", "unlist_topic"=>"false", "category"=>"3", "topic_id"=>"71", "is_warning"=>"false", "archetype"=>"regular", "typing_duration_msecs"=>"200", "composer_open_duration_msecs"=>"2658", "featured_link"=>"", "shared_draft"=>"false", "draft_key"=>"topic_71", "nested_post"=>"true"}
[PrettyText] BAD MARKDOWN CALLBACK FOUND
[PrettyText] FEATURE IS: md-ruby
Completed 500 Internal Server Error in 76ms (ActiveRecord: 0.0ms | Allocations: 4230)

```

- The error is thrown whether or not there is any ruby text (`{...|...}`) in the post.
- This post `https://meta.discourse.org/t/discourse-markdown-extensions-not-working-after-latest-discourse-upgrade/294155/1` seemed to have a similar issue, but I updated the extension to `.js` and it did not get fixed.
- I also updated the `markdown-it-ruby` plugin to the latest version 1.1.1 by copying the plugin into the file `/assets/javascripts/vendor/markdown-it-ruby.js` in my repo.

Thanks in advance. Sorry for the links, I can only post 2.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [November 27, 2024, 8:58pm UTC](https://meta.discourse.org/t/discourse-markdown-plugin-error/338340/2 "2024-11-27T20:58:31Z")

</div>

> [@aiong](#):
>
> `[PrettyText] BAD MARKDOWN CALLBACK FOUND`

That line points to:

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-markdown-it/src/engine.js#L40](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-markdown-it/src/engine.js#L40)

The plugin likely needs to be updated to properly hook the `discourse-markdown-it`.
