Skip to content

Commit

Permalink
bug fix && version dump
Browse files Browse the repository at this point in the history
  • Loading branch information
techird committed Nov 20, 2014
1 parent e10e93c commit deaef9d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@

# KityMinder 更新日志

## v1.3.5

### 功能更新

1. 支持 Markdown 格式导入和导出

### 问题修复

1. 修复备注在分享页面不能查看的问题
2. 修复字体颜色修改不能撤销的问题

## v1.3.4

### 功能更新
Expand Down Expand Up @@ -142,7 +153,7 @@
7. 可指定放大缩小的百分比


## 问题修复
### 问题修复

1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/core/kityminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
26 changes: 19 additions & 7 deletions src/protocol/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,20 @@ KityMinder.registerProtocol('markdown', function() {
var sharps = _generateHeaderSharp(level);
lines.push(sharps + ' ' + node.data.text);
lines.push(EMPTY_LINE);

if (node.data.note) {
lines.push(NOTE_MARK_START);
lines.push(node.date.note.replace(/^#*/g, function($0) {
return sharps + $0;
}));
lines.push(NOTE_MARK_CLOSE);

var note = node.data.note;
if (note) {
var hasSharp = /^#/.test(note);
if (hasSharp) {
lines.push(NOTE_MARK_START);
note = note.replace(/^#+/gm, function($0) {
return sharps + $0;
});
}
lines.push(note);
if (hasSharp) {
lines.push(NOTE_MARK_CLOSE);
}
lines.push(EMPTY_LINE);
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit deaef9d

Please sign in to comment.