terrylinooo / githuber-md

Markdown editor plugin for WordPress.
GNU General Public License v3.0
604 stars 88 forks source link

SQL syntax highlighting #328

Closed klspstck closed 9 months ago

klspstck commented 11 months ago

Any issue will be ignored if you don't provide the following detailed information.

Describe the bug

A clear and concise description of what the bug is.

When using code blocks with highlight.js or prism.js for SQL only lowercase keywords are highlighted. ANSI specifies SQL keywords should be in UPPERCASE.

At least both cases should be highlighted.

It is not an issue with highlight.js, because on their github issue page both cases are highlighted properly. I raised an issue there, too.

To reproduce

Steps to reproduce the behavior:

  1. install and activate the plugin
  2. Go to Settings -> Wp Githuber MD -> Modules
  3. Choose "highlight.js" to be enabled
  4. Create a new page and paste in the following code:
SELECT
  *
FROM table
;
select
  *
from table
;

Expected behavior

A clear and concise description of what you expected to happen.

For me as an instructor only the first version is correct, but there are some "SQL cracks" writing everything in lower case. ;-))

Screenshots

If applicable, add screenshots to help explain your problem. grafik

Server environment

User environment

Additional context

Add any other context about the problem here. ./.

Nyx1197 commented 11 months ago

Try to clone latest version code.(Not WordPress Plugins, just clone in /wp-content/plugins and switch to locale version)

图片 I test it work ok.

I use prism.js, highlight.js not tested.

klspstck commented 11 months ago

html,body{background-color:#fff;color:#333;line-height:1.4;font-family:sans-serif,Arial,Verdana,Trebuchet MS;}I will give it a try, too. Kind regards Klaus P. StockStock & PartnerAdvanced Education GmbH----------------------- Nyx1197 schrieb am 15.09.2023 09:12 (GMT +02:00):

Try to clone least version code. I test it work ok. I use prism.js, highlight.js not tested. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

klspstck commented 11 months ago

html,body{background-color:#fff;color:#333;line-height:1.4;font-family:sans-serif,Arial,Verdana,Trebuchet MS;}OK. I tested it and the preview is showing the appropriate syntax highlighting with prism. What is confuding is, the previes in  the editor is not showing capitalized keywords highlighted.   "highlight.js" is not working at all, not in the editor nor bthe page preview.   I will use "prism".   Thank you and kind regards Klaus P. StockStock & PartnerAdvanced Education GmbH----------------------- Nyx1197 schrieb am 15.09.2023 09:12 (GMT +02:00):

Try to clone least version code. I test it work ok. I use prism.js, highlight.js not tested. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] commented 9 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.