提交 78226873 编写于 作者: 刘子健

refactor(highlight): 重构高亮正则

上级 a36e61a8
......@@ -5,12 +5,13 @@ var jade = require('gulp-jade')
var copy = require('gulp-copy')
var rimrafPromise = require('rimraf-promise')
var ghPages = require('gulp-gh-pages')
var fs = require('fs')
gulp.task('resume-sass', function () {
gulp.src('src/css/resume.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
browsers: ['last 4 versions'],
cascade: false
}))
.pipe(gulp.dest('dist/css/'))
......@@ -20,7 +21,7 @@ gulp.task('icon-sass', function () {
gulp.src('src/css/iconfont.scss')
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
browsers: ['last 4 versions'],
cascade: false
}))
.pipe(gulp.dest('dist/iconfont/'))
......@@ -47,22 +48,8 @@ function src2dist(dir) {
function highlight(locals) {
var locals = JSON.stringify(locals)
var re = new RegExp('`.*?`', 'i')
while(re.test(locals)) {
var find = re.exec(locals)[0]
var bold = find.replace('`', '<strong>').replace('`', '</strong>')
locals = locals.replace(find, bold)
}
// var reEng = new RegExp('[a-z]+\/?-?[a-z]*', 'i')
// while(reEng.test(locals)) {
// var find = reEng.exec(locals)[0]
// var bold = ` ${find} `
// locals = locals.replace(find, bold)
// }
var re = /`(.+?)`/g
locals = locals.replace(re, '<strong>$1</strong>')
return JSON.parse(locals)
}
......
......@@ -131,22 +131,6 @@
"默认支持 `COR跨域,Gzip, 文件上传` ,开箱即用"
]
}
}, {
"title": {
"place": "博客系统",
"links": [{
"name": "源代码",
"href": "https://github.com/guyskk/kkblog"
}]
},
"content": {
"position": "前端开发",
"tasks": [
"负责博客页面的设计与编写",
"前端使用 AmazeUI 框架,实现页面自适应",
"学习`前端性能优化`,如JS代码后置,代码压缩打包等"
]
}
}, {
"title": {
"place": "个人简历",
......@@ -191,7 +175,7 @@
"能熟练使用 `Vue` 并搭配 Vuex 与 Vue-Router 完成单页应用的编写",
"熟悉 `jQuery/Bootstrap` 等常见框架类库的使用",
"对 React 和 Angular 等业界主流框架有所了解",
"熟练使用 `Gulp,Webpack` 等代码构建工具"
"熟练使用 `Gulp, Webpack` 等代码构建工具"
]
}]
},
......@@ -226,9 +210,9 @@
}, {
"name": "工具使用",
"description": [
"使用 Linux 六个月,`在 Linux 环境下完成日常工作`",
"熟练使用 Git 等团队协作工具",
"日常使用 `Sublime Text` 进行开发,能简单的操作 Vim "
"一年 Linux 使用经验,`使用 Linux 作为日常工作系统`",
"熟练使用 Git 等代码管理与团队协作工具",
"日常使用 `Sublime Text / Atom ` 进行开发,能简单的操作 Vim "
]
}]
}
......
......@@ -20,6 +20,7 @@ h3 {
body {
font-family: 'Helvetica Neue', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'STHeiti', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
background: #e0e0e0;
-webkit-font-smoothing: antialiased;
}
a,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册