Closes #349. Add Visualforce language and use Pretty Diff beautifier
This commit is contained in:
parent
4e12ce9c6c
commit
d1dd3b2059
|
@ -0,0 +1,5 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:detail />
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,5 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,17 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
<apex:form >
|
||||
<apex:pageBlock title="Contact">
|
||||
<apex:pageBlockSection title="Editing">
|
||||
<apex:inputfield value="{!contact.firstname}"/>
|
||||
<apex:inputfield value="{!contact.lastname}"/>
|
||||
<apex:inputfield value="{!contact.salutation}"/>
|
||||
<apex:inputfield value="{!contact.birthdate}"/>
|
||||
<apex:commandButton value="Save" action="{!save}"/>
|
||||
</apex:pageBlockSection>
|
||||
</apex:pageBlock>
|
||||
</apex:form>
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,14 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
<apex:pageBlock title="Contact">
|
||||
<apex:pageBlockSection title="Details">
|
||||
<apex:outputfield value="{!contact.firstname}"/>
|
||||
<apex:outputfield value="{!contact.lastname}"/>
|
||||
<apex:outputfield value="{!contact.salutation}"/>
|
||||
<apex:outputfield value="{!contact.birthdate}"/>
|
||||
</apex:pageBlockSection>
|
||||
</apex:pageBlock>
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,5 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:detail />
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,5 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,17 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
<apex:form >
|
||||
<apex:pageBlock title="Contact">
|
||||
<apex:pageBlockSection title="Editing">
|
||||
<apex:inputfield value="{!contact.firstname}"/>
|
||||
<apex:inputfield value="{!contact.lastname}"/>
|
||||
<apex:inputfield value="{!contact.salutation}"/>
|
||||
<apex:inputfield value="{!contact.birthdate}"/>
|
||||
<apex:commandButton value="Save" action="{!save}"/>
|
||||
</apex:pageBlockSection>
|
||||
</apex:pageBlock>
|
||||
</apex:form>
|
||||
|
||||
</apex:page>
|
|
@ -0,0 +1,14 @@
|
|||
<apex:page standardController="Contact">
|
||||
|
||||
<apex:sectionHeader title="{!contact.firstname}" subtitle="{!contact.account.name}"/>
|
||||
|
||||
<apex:pageBlock title="Contact">
|
||||
<apex:pageBlockSection title="Details">
|
||||
<apex:outputfield value="{!contact.firstname}"/>
|
||||
<apex:outputfield value="{!contact.lastname}"/>
|
||||
<apex:outputfield value="{!contact.salutation}"/>
|
||||
<apex:outputfield value="{!contact.birthdate}"/>
|
||||
</apex:pageBlockSection>
|
||||
</apex:pageBlock>
|
||||
|
||||
</apex:page>
|
|
@ -30,6 +30,7 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
TSS: true
|
||||
LESS: true
|
||||
Swig: true
|
||||
Visualforce: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
|
@ -43,21 +44,34 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
switch language
|
||||
when "CSV"
|
||||
lang = "csv"
|
||||
when "EJS", "ERB", \
|
||||
"Handlebars", "Mustache", \
|
||||
# "Markup", "JSTL", "SGML", \ # Currently unsupported
|
||||
"Spacebars", "XML", "Swig"
|
||||
when "EJS"
|
||||
lang = "ejs"
|
||||
when "ERB"
|
||||
lang = "html_ruby"
|
||||
when "Handlebars", "Mustache", "Spacebars"
|
||||
lang = "handlebars"
|
||||
when "SGML", "Swig"
|
||||
lang = "markup"
|
||||
when "XML", "Visualforce"
|
||||
lang = "xml"
|
||||
when "HTML"
|
||||
lang = "html"
|
||||
when "JavaScript", "JSON", "JSX"
|
||||
when "JavaScript"
|
||||
lang = "javascript"
|
||||
when "CSS", "LESS", "SCSS", "Sass"
|
||||
when "JSON"
|
||||
lang = "json"
|
||||
when "JSX"
|
||||
lang = "jsx"
|
||||
when "JSTL"
|
||||
lang = "jsp"
|
||||
when "CSS"
|
||||
lang = "css"
|
||||
when "LESS"
|
||||
lang = "less"
|
||||
when "SCSS", "Sass"
|
||||
lang = "scss"
|
||||
when "TSS"
|
||||
lang = "tss"
|
||||
# when "Plain text"
|
||||
# lang = "text"
|
||||
else
|
||||
lang = "auto"
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ module.exports = class Languages
|
|||
"tss"
|
||||
"typescript"
|
||||
"vala"
|
||||
"visualforce"
|
||||
"xml"
|
||||
]
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
module.exports = {
|
||||
|
||||
name: "Visualforce"
|
||||
namespace: "visualforce"
|
||||
fallback: ['html','xml']
|
||||
|
||||
###
|
||||
Supported Grammars
|
||||
###
|
||||
grammars: [
|
||||
"Visualforce"
|
||||
]
|
||||
|
||||
###
|
||||
Supported extensions
|
||||
###
|
||||
extensions: [
|
||||
"page"
|
||||
]
|
||||
|
||||
options: []
|
||||
|
||||
}
|
Loading…
Reference in New Issue