mirror of
https://github.com/stablyai/orca.git
synced 2026-09-27 00:02:37 +00:00
fix(editor): use the bundled ABAP grammar (#22417)
Co-authored-by: Jonghwa Hong <zzzonghwa@gmail.com>
This commit is contained in:
@@ -38,6 +38,25 @@ describe('detectLanguage', () => {
|
||||
expect(detectLanguage('C:\\rtl\\TOP.SV')).toBe('systemverilog')
|
||||
})
|
||||
|
||||
it.each([
|
||||
'report.abap',
|
||||
'src/zcor0260.prog.abap',
|
||||
'src/zcl_demo.clas.abap',
|
||||
'src/zif_demo.intf.abap',
|
||||
'C:\\repo\\src\\ZCL_DEMO.CLAS.ABAP',
|
||||
'\\\\server\\share\\src\\ZREPORT.PROG.ABAP',
|
||||
'/home/user/folder workspace/src/Report.AbAp'
|
||||
])('maps ABAP source %s to the Monaco built-in abap language id', (filePath) => {
|
||||
expect(detectLanguage(filePath)).toBe('abap')
|
||||
})
|
||||
|
||||
it.each(['src.abap/README', 'src\\abap.abap\\README', 'report.abap.bak', 'report.abapx'])(
|
||||
'keeps non-ABAP file %s on plaintext',
|
||||
(filePath) => {
|
||||
expect(detectLanguage(filePath)).toBe('plaintext')
|
||||
}
|
||||
)
|
||||
|
||||
it('maps .proto files to the Monaco built-in proto language id, not the alias', () => {
|
||||
expect(detectLanguage('api/v1/service.proto')).toBe('proto')
|
||||
})
|
||||
|
||||
@@ -104,6 +104,7 @@ const EXT_TO_LANGUAGE: Record<string, string> = {
|
||||
'.nimble': 'nim',
|
||||
'.tf': 'hcl',
|
||||
'.hcl': 'hcl',
|
||||
'.abap': 'abap',
|
||||
'.prisma': 'graphql',
|
||||
'.csv': 'csv',
|
||||
'.tsv': 'tsv'
|
||||
|
||||
Reference in New Issue
Block a user