mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-01 18:35:13 +00:00
Enable Dockerfile detection
This commit is contained in:
@@ -24,7 +24,7 @@ public sealed class DockerfileDetector : IFormatDetector
|
||||
{
|
||||
public string Name => "Dockerfile";
|
||||
|
||||
public string Extension => null;
|
||||
public string Extension => ".sh";
|
||||
|
||||
public bool Detect(string path, string text)
|
||||
{
|
||||
|
@@ -30,7 +30,7 @@ public class FormatDetector
|
||||
new MakefileDetector(),
|
||||
new CMakeListsDetector(),
|
||||
//new HostsDetector(),
|
||||
//new DockerfileDetector(),
|
||||
new DockerfileDetector(),
|
||||
];
|
||||
|
||||
public static IFormatDetector Confuse(string path, string text)
|
||||
|
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<SyntaxDefinition name="Shell Script" extensions=".sh">
|
||||
|
||||
<RuleSets>
|
||||
<RuleSet ignorecase="false">
|
||||
<Span name="LineComment" stopateol="true" color="#6A9955" bold="false" italic="false">
|
||||
<Begin>#</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name="String" color="#CE9178" stopateol="true" bold="false" italic="false" escapecharacter="\">
|
||||
<Begin>"</Begin>
|
||||
<End>"</End>
|
||||
</Span>
|
||||
|
||||
<Span name="Char" color="#CE9178" stopateol="true" bold="false" italic="false" escapecharacter="\">
|
||||
<Begin>'</Begin>
|
||||
<End>'</End>
|
||||
</Span>
|
||||
|
||||
<KeyWords name="Syntax" color="#569CD6" bold="false">
|
||||
<Key word="if"/>
|
||||
<Key word="then"/>
|
||||
<Key word="fi"/>
|
||||
</KeyWords>
|
||||
|
||||
</RuleSet>
|
||||
</RuleSets>
|
||||
</SyntaxDefinition>
|
Reference in New Issue
Block a user