Commit 40160914 authored by techird's avatar techird

Merge branch 'release/1.3.5' into dev

parents e10e93c3 deaef9d5
# KityMinder 更新日志
## v1.3.5
### 功能更新
1. 支持 Markdown 格式导入和导出
### 问题修复
1. 修复备注在分享页面不能查看的问题
2. 修复字体颜色修改不能撤销的问题
## v1.3.4
### 功能更新
......@@ -142,7 +153,7 @@
7. 可指定放大缩小的百分比
## 问题修复
### 问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
......
......@@ -66,7 +66,7 @@ module.exports = function(grunt) {
// Metadata.
pkg: grunt.file.readJSON('package.json'),
clean: ['dist', 'native-support/upload', 'native-support/src/tmp'],
clean: ['dist', 'native-support/upload/', 'native-support/src/tmp/'],
concat: concatConfigs,
......
......@@ -2,7 +2,7 @@
"name": "kityminder",
"title": "kityminder",
"description": "Kity Minder",
"version": "1.3.4",
"version": "1.3.5",
"homepage": "https://github.com/fex-team/kityminder",
"author": {
"name": "f-cube @ FEX",
......
......@@ -3,7 +3,7 @@ var KityMinder = window.KM = window.KityMinder = function() {
instanceId = 0,
uuidMap = {};
return {
version: '1.3.4',
version: '1.3.5',
uuid: function(name) {
name = name || 'unknown';
uuidMap[name] = uuidMap[name] || 0;
......
......@@ -27,12 +27,19 @@ KityMinder.registerProtocol('markdown', function() {
lines.push(sharps + ' ' + node.data.text);
lines.push(EMPTY_LINE);
if (node.data.note) {
var note = node.data.note;
if (note) {
var hasSharp = /^#/.test(note);
if (hasSharp) {
lines.push(NOTE_MARK_START);
lines.push(node.date.note.replace(/^#*/g, function($0) {
note = note.replace(/^#+/gm, function($0) {
return sharps + $0;
}));
});
}
lines.push(note);
if (hasSharp) {
lines.push(NOTE_MARK_CLOSE);
}
lines.push(EMPTY_LINE);
}
......@@ -133,6 +140,11 @@ KityMinder.registerProtocol('markdown', function() {
if (!/\S/.test(node.data.note)) {
node.data.note = null;
delete node.data.note;
} else {
var notes = node.data.note.split('\n');
while(notes.length && !/\S/.test(notes[0])) notes.shift();
while(notes.length && !/\S/.test(notes[notes.length - 1])) notes.pop();
node.data.note = notes.join('\n');
}
if (node.children) node.children.forEach(_cleanUp);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment