Merge branch 'prettydiff2' of https://github.com/prettydiff/atom-beautify into prettydiff-prettydiff2

This commit is contained in:
Glavin Wiechert 2017-10-07 14:14:31 -03:00
commit 42d4d18404
13 changed files with 42 additions and 39 deletions

View File

@ -56,7 +56,7 @@ matrix:
env:
global:
- APM_TEST_PACKAGES="language-marko language-html-swig language-svg language-d mavensmate-atom language-lua language-puppet"
- APM_TEST_PACKAGES="language-marko language-html-swig language-svg language-d mavensmate-atom language-lua language-puppet language-fuse"
- PATH="/home/travis/gopath/bin:$HOME/.linuxbrew/bin:$PATH"
addons:

View File

@ -133,7 +133,7 @@ build_script:
- cd %APPVEYOR_BUILD_FOLDER%
# Install languages to Atom
- apm install language-marko language-html-swig language-svg language-elm language-d mavensmate-atom language-lua
- apm install language-marko language-html-swig language-svg language-elm language-d mavensmate-atom language-lua language-fuse
# Show current PATH
- echo %PATH%
# Run tests on package

View File

@ -1,19 +0,0 @@
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></title>
</head>
<body>
<h1>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></h1>
<p>You need to buy:</p>
<ul>
<% for @item in @items %>
<li><%= h(@item) %></li>
<% end %>
</ul>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></title>
</head>
<body>
<h1>Shopping List for
<%= @date.strftime('%A, %d %B %Y') %></h1>
<p>You need to buy:</p>
<ul>
<% for @item in @items %>
<li><%= h(@item) %></li>
<% end %>
</ul>
</body>
</html>

View File

@ -1,4 +1,4 @@
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

View File

@ -113,6 +113,7 @@
.slideIn {
.animation(SlideIn, 0.5s);
}
@-webkit-keyframes SlideIn {
0% {
.transform(translateY(-100%));
@ -127,6 +128,7 @@
display: block;
.animation(FadeIn, 0.5s);
}
@-webkit-keyframes FadeIn {
0% {
opacity: 0;
@ -140,6 +142,7 @@
.slideOut {
.animation(SlideOut, 0.5s);
}
@-webkit-keyframes SlideOut {
0% {
.transform(translateY(0%));
@ -153,6 +156,7 @@
.fadeOut {
.animation(FadeOut, 0.5s);
}
@-webkit-keyframes FadeOut {
0% {
opacity: 1;

View File

@ -17,7 +17,7 @@
]
</script>
<style scoped>
<style scoped="scoped">
:scope {
font-size: 2rem;
}

View File

@ -1,4 +1,5 @@
/* kendo UI */
@import "variables";
// slider

View File

@ -179,7 +179,7 @@
"node-dir": "0.1.17",
"node-uuid": "1.4.8",
"open": "0.0.5",
"prettydiff": "1.16.37",
"prettydiff2": ">2.2.5",
"pug-beautify": "^0.1.1",
"remark": "6.0.1",
"season": "6.0.0",
@ -426,7 +426,7 @@
"typescript-formatter",
"tidy-markdown",
"underscore-plus",
"prettydiff"
"prettydiff2"
]
}
},
@ -438,7 +438,7 @@
"typescript-formatter",
"tidy-markdown",
"underscore-plus",
"prettydiff"
"prettydiff2"
]
}
}

View File

@ -44,12 +44,11 @@ describe "BeautifyLanguages", ->
# Activate all of the languages
allLanguages = [
"c", "clojure", "coffee-script", "css", "d", "html",
"java", "javascript", "json", "less",
"mustache", "objective-c", "perl", "php",
"python", "ruby", "sass", "sql", "svg",
"xml", "csharp", "gfm", "marko",
"go", "html-swig", "lua"
"c", "clojure", "coffee-script", "css", "csharp", "d", "fuse",
"gfm", "go", "html", "html-swig", "java", "javascript",
"json", "less", "lua", "marko", "mustache", "objective-c",
"perl", "php", "python", "ruby", "sass", "sql",
"svg", "xml"
]
# All Atom packages that Atom Beautify is dependent on
dependentPackages = [

View File

@ -73,7 +73,7 @@ module.exports = class PrettyDiff extends Beautifier
beautify: (text, language, options) ->
options.crlf = @getDefaultLineEnding(true,false,options.end_of_line)
return new @Promise((resolve, reject) =>
prettydiff = require("prettydiff")
prettydiff = require("prettydiff2")
_ = require('lodash')
# Select Prettydiff language
@ -127,8 +127,7 @@ module.exports = class PrettyDiff extends Beautifier
# Beautify
@verbose('prettydiff', options)
output = prettydiff.api(options)
result = output[0]
result = prettydiff(options)
# Return beautified text
resolve(result)

View File

@ -10,7 +10,7 @@ module.exports = class VueBeautifier extends Beautifier
beautify: (text, language, options) ->
return new @Promise((resolve, reject) =>
prettydiff = require("prettydiff")
prettydiff = require("prettydiff2")
_ = require('lodash')
regexp = /(^<(template|script|style)[^>]*>)((\s|\S)*?)^<\/\2>/gim
@ -37,14 +37,14 @@ module.exports = class VueBeautifier extends Beautifier
lang: "scss"
mode: "beautify"
)
prettydiff.api(options)[0]
prettydiff(options)
when "less"
options = _.merge(options,
source: text
lang: "less"
mode: "beautify"
)
prettydiff.api(options)[0]
prettydiff(options)
when undefined
require("js-beautify").css(text, options)
else

View File

@ -2,7 +2,7 @@ module.exports = {
name: "UX Markup"
namespace: "ux"
fallback: ['html']
fallback: ['xml']
###
Supported Grammars