Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求和原项目合并,这里主要是实现了无限级目录解析的支持 #30

Closed
wants to merge 2 commits into from

Conversation

YaoXuanZhi
Copy link

  • 让粘贴截图功能支持无限级目录
  • 让导航支持无限级的解析
  • 让重复ID检测支持无限级目录分析

@YaoXuanZhi
Copy link
Author

大大你好,我在移植amWiki到VSCode的过程中,实现了无限级目录的解析支持,因此在此分支上添加了此功能。目前$navigation.md内容是正确生成的了,不过在浏览器上浏览的时候,生成的页面导航有点奇怪,麻烦你调整一下这个导航页面的模板文件了

@TevinLi
Copy link
Owner

TevinLi commented Apr 30, 2017

@YaoXuanZhi ,感谢你的无限级目录代码提供!
无限级目录最麻烦的是导航这块了(系统滚动条太丑,弃之),当时已有重构导航的计划(人工实现垂直水平双向滚动条+移动端操作区分+高级筛选),想要一次做完安排不过来,而导航不支持的话做无限级目录没有意义
所以无限级目录一直拖到现在,陆陆续续一些细分的功能终于都一一完成了,不过现在代码已经有不少变化,不能再简单的合并了,我参考你的代码重新写进来吧

@YaoXuanZhi
Copy link
Author

嗯嗯,有点借鉴意义就好啦,我这边没关系哒O(∩_∩)O,等你代码重构完之后,我再把amWikiForVSCode做一次整体同步更新♪(^∇^*)

@TevinLi
Copy link
Owner

TevinLi commented May 1, 2017

嗯嗯,好的,你同步过去吧
不过有个问题要你说下呀,不能把 MIT License 上我的名字直接给删掉哟,要不这样吧,就用逗号隔开写两名字,怎么样?

@YaoXuanZhi
Copy link
Author

好的,我下次更新发布的时候,就是采用原amWiki的 MIT License的哈☺

@TevinLi
Copy link
Owner

TevinLi commented May 7, 2017

获得 libraryPath 的思路很赞呀,看了你反向查找的方法之后,我感觉我之前直接截断的方式简直有些太粗暴了 😅
我打算后面找个版本专门替换一下,换成反向查找的方式,这样就不怕一个路径里面有两个 library 了

@TevinLi
Copy link
Owner

TevinLi commented May 21, 2017

新版本的无限级目录支持,已于 v1.1.0 发布,可以同步啦
不过整体代码和你上一次同步的时候差异蛮大的了,可能需要辛苦一下了

@TevinLi
Copy link
Owner

TevinLi commented May 21, 2017

这里有一个这样的方案可以提供参考,全部或部分代码的移植,可以用这种思路来减轻工作量
比如在入口文件 main.js 的第一行加入:

require('./conversion');

然后在 conversion.js 文件上这样写

var atom = {
    workspace: {
        getActiveTextEditor: function() {
            var editor = vscode.window.activeTextEditor;
            editor.getGrammar = funtion() {
                return editor.document.languageId
            };
            return editor;
        }
    }
};

这样一来,main.js 和它所引用的所有文件都能获取 editor 了,并且还把 editor 的 getGrammar 方法转换为了 document.languageId 的结果,而且将来无论怎么改动升级都不影响这两个方法写的功能

@TevinLi TevinLi closed this May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants