Skip to content

Add X++ Markdown code-fence highlighting - #8248

Closed
fraga wants to merge 1 commit into
github-linguist:mainfrom
fraga:feat/xpp-highlighting
Closed

fraga wants to merge 1 commit into
github-linguist:mainfrom
fraga:feat/xpp-highlighting

Conversation

@fraga

@fraga fraga commented Oct 6, 2026 •

Copy link
Copy Markdown

Description

Enable Microsoft Dynamics 365 X++ syntax highlighting for explicitly labelled xpp Markdown code fences, using the MIT-licensed source.xpp grammar.

For example:

```xpp
[ExtensionOf(tableNum(CustTable))]
final class CustTable_Extension
{
}
```

The language entry has an alias and grammar scope, with no extensions, filenames, or interpreters. Markdown documents retain their Markdown classification, and AxClass XML files retain their XML classification. This proposal adds no file-detection heuristics or classifier samples.

Related to #6535.

Request for maintainer review

This draft proposes a highlighting-only language registration. There is a merged precedent: #3092 added Python console specifically to highlight Markdown documents and comments using pycon, without defining extensions or filenames. That entry remains in languages.yml; Julia REPL and Elvish Transcript also have grammar scopes without file associations.

X++ has an official Microsoft language reference. The intended benefit is readable X++ examples in documentation, READMEs, issues, and comments. GitHub's code-block documentation identifies Linguist language entries as the source of supported fence identifiers and grammar selection.

Microsoft's public Markdown source already uses xpp fence identifiers in its classes and methods reference, select-statement reference, and Chain of Command documentation. These are concrete examples of the existing Markdown convention that this proposal would highlight on GitHub; they are documentation-use evidence rather than an extension-usage count.

The usage requirements are expressed per extension or filename. This proposal adds neither. The console precedents concern dialects of existing languages, so acceptance of a standalone X++ entry under the current contribution policy still needs maintainer confirmation. This draft requests that review; the extension-usage requirement below remains unchecked.

Checklist:

  • I am adding a new language.

    • The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension: no extensions or filenames are proposed; eligibility for highlighting-only registration is the review question above.
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s): not applicable to the proposed file associations; none are added.
      • Sample license(s): no classifier samples are added to Linguist. Grammar fixtures and their original sources are documented in the grammar repository's third-party notices.
    • I have included a syntax highlighting grammar: fraga/xpp-syntax, pinned to 972ad90, licensed under MIT.
    • I have added a color
      • Hex value: #004D8F
      • Rationale: Author-selected blue for the new X++ language entry.
    • I have updated the heuristics to distinguish my language from others using the same extension.
      • Not applicable: no extension is registered and no heuristic is added.
  • I am adding new or changing current functionality

    • I have added or updated the tests for the new or changed functionality.

Validation

  • Linguist tests: 2,054 runs, 41,114 assertions, zero failures, errors, or skips.
  • TextMate/Oniguruma tests: 33 passing, verified with both the default XML grammar and Linguist's vendored XML grammar.
  • Regex compatibility: 607 patterns pass Ruby, Go, and Rust checks.
  • Classifier cross-validation passes with 14 errors, within the upstream allowance of 14.
  • Grammar PCRE validation and local license checks pass.
  • Grammar GitHub Actions passes for the pinned grammar commit.
  • Full Linguist GitHub Actions on the fork passes: Ruby 3.3, 3.4, and 4.0 tests and license checks, regex compatibility, classifier cross-validation, and Docker. The validation branch contains this contribution plus a fork-only workflow push trigger; that trigger is outside this PR.

@fraga
fraga requested a review from a team as a code owner October 6, 2026 04:51
@fraga
fraga marked this pull request as draft October 6, 2026 05:12
Register the xpp alias and source.xpp grammar for explicitly labelled
Markdown code fences, without file extensions, filenames, or interpreters.

Add regression coverage for alias resolution, file associations, and
Markdown/XML file detection.

Import the MIT-licensed grammar from fraga/xpp-syntax.
@fraga
fraga force-pushed the feat/xpp-highlighting branch from 5231d71 to e18a4dc Compare October 6, 2026 05:21
@fraga fraga changed the title Add X++ language support and xpp Markdown alias Add X++ Markdown code-fence highlighting Oct 6, 2026
@fraga
fraga marked this pull request as ready for review October 7, 2026 02:12
@Alhadis

Alhadis commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

This draft proposes a highlighting-only language registration. There is a merged precedent: #3092 added Python console specifically to highlight Markdown documents and comments using pycon, without defining extensions or filenames. That entry remains in languages.yml; Julia REPL and Elvish Transcript also have grammar scopes without file associations.

All three of these "highlighting-only" languages share one quality that justifies their exceptional inclusion: they're interactive transcripts of other (supported) programming languages (Python, Julia, Elvish) which is valuable for pedagogy in documentation code-blocks (e.g., a Python project might illustrate how to use its exports from a REPL).

X++ doesn't have this property; it's unsupported by Linguist and doesn't appear to meet the real-world usage threshold that Linguist requires to admit new languages (I'm assuming you did read the contribution guidelines, yes? 😉)

@Alhadis Alhadis closed this Oct 7, 2026
@Alhadis Alhadis added the Invalid CONTRIBUTING.md file has not been followed or PR template not used. label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Invalid CONTRIBUTING.md file has not been followed or PR template not used.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants