所以我尝试了这个:
if (/^[a-zA-Z]/.test(word)) {
// code
}
Run Code Online (Sandbox Code Playgroud)
它不接受这个: " "
但它确实接受了这个:"word word"
它确实包含一个空格:/
有没有办法做到这一点?
我正在我的网站上工作,我想使用Susy和Compass.我也在使用Grunt.当我运行我的grunt任务时,我收到此错误:
Denniss-MacBook-Pro:portfolio dennis$ grunt --trace
Running "compass:dev" (compass) task
Gem::LoadError on line ["1990"] of /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb: Unable to activate susy-2.1.1, because sass-3.2.17 conflicts with sass (~> 3.3.0)
Run with --trace to see the full backtrace
Warning: ? Use --force to continue.
Aborted due to warnings.
Run Code Online (Sandbox Code Playgroud)
这是我的Grunt文件:
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
options: {
livereload: true
},
css: {
files: ['_sass/*.{scss,sass}'],
tasks: ['compass:dev']
},
js: {
files: ['js/*.js'],
tasks: ['uglify']
}
},
compass: {
options: {
require: 'susy' …
Run Code Online (Sandbox Code Playgroud)