Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 496681

Summary: add syntax styler support for firstLineMatch
Product: [ECD] Orion Reporter: Grant Gayed <grant_gayed>
Component: EditorAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jlittlej
Version: 12.0Keywords: triaged
Target Milestone: 14.0   
Hardware: PC   
OS: Mac OS X   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511245
Whiteboard:

Description Grant Gayed CLA 2016-06-23 14:23:56 EDT
will be useful for differentiating between different shell script flavours
Comment 1 Grant Gayed CLA 2017-01-24 15:24:16 EST
Fixed, commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=fca091c172b520f785bf97c643661f376c81ad60 .

To use it add a firstLineMatch at the root level of a grammar, for example:

grammars.push({
	id: "orion.sh",
	contentTypes: ["application/x-sh"],
	firstLineMatch: "^#!/bin/sh\\b",
	patterns: [
		{include: "#string_doubleQuote"},
		{include: "#string_singleQuote"},
		...snip...