BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.39k stars 1.93k forks source link

Add x86/x86_64 assembly to list of supported languages in code blocks #4976

Open ghost opened 6 months ago

ghost commented 6 months ago

Describe the feature you'd like

I'd like syntax highlighting for x86 and x86_64 assembly languages in code blocks.

Describe the benefits this would bring to existing BookStack users

Be able to read assembly code blocks more easily.

Can the goal of this request already be achieved via other means?

No

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

3 months to 1 year

Additional context

There is "x86asm" in highlight.js : https://github.com/highlightjs/highlight.js/blob/main/src/languages/x86asm.js

ssddanbrown commented 6 months ago

Thanks for the suggestion @qbe4, Since I'm not too familiar with the forms of assembly, does the syntax highlighting here look correct?: https://codemirror.net/5/mode/gas/index.html

Saving this for my implementation reference: https://github.com/codemirror/legacy-modes/blob/main/mode/gas.js

ghost commented 6 months ago

Hi @ssddanbrown, in fact the syntax used in GAS is the AT&T syntax which is quite ugly and not very used. The most commonly used syntax is the Intel syntax. To see the difference between the two : AT&T Syntax and Intel Syntax.

I doesn't have found an implementation of the Intel syntax in codemirror :(