Skip to content

Commit

Permalink
[SOURCE] Initial text folding support.
Browse files Browse the repository at this point in the history
Done :
- Headers
- #regions in HTML comments

TODO :
- multi-line `<LI>`
- HTML code blocks

Progress on #4
  • Loading branch information
GehDoc committed Mar 14, 2020
1 parent 49c2e56 commit f6c9471
Show file tree
Hide file tree
Showing 6 changed files with 378 additions and 36 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]
### Fixed
- [INTERNAL] fix npm security alerts
- Update textile-js to , to get HTML comments line-numbering, and a fix for `<LI>`

### Changed
- [INTERNAL] Include shared.webpack config to diffs.
- Update to vscode 1.43.0
- [INTERNAL] fix npm security alerts

### Added
- [SOURCE] Code folding. Progress on #4


## [1.1.0-dev] - 20200305
Expand Down
4 changes: 4 additions & 0 deletions exemples/syntax.textile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ This is "a link to main repo":vtp, "another link":vtp and a ["Markdow-style link

ABBR(Abbreviation)

<!-- #region Exemple of foldable region through HTML comments -->

- Word 1 := Definition 1.
- Word 2 := Beginning of
a multi-lines
Expand All @@ -105,6 +107,8 @@ definition =:
document.write('help');
</code></pre>

<!-- #endregion Exemple of foldable region through HTML comments -->

bc.
// Comment inside "bc."
document.write('help');
Expand Down
80 changes: 48 additions & 32 deletions libs/textile-js/textile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { CommandManager } from './commandManager';
import * as commands from './commands/index';
import LinkProvider from './features/documentLinkProvider';
import TextileDocumentSymbolProvider from './features/documentSymbolProvider';
//import TextileFoldingProvider from './features/foldingProvider';
import TextileFoldingProvider from './features/foldingProvider';
import { TextileContentProvider } from './features/previewContentProvider';
import { TextilePreviewManager } from './features/previewManager';
import TextileWorkspaceSymbolProvider from './features/workspaceSymbolProvider';
Expand Down Expand Up @@ -65,9 +65,7 @@ function registerTextileLanguageFeatures(
}),
vscode.languages.registerDocumentSymbolProvider(selector, symbolProvider),
vscode.languages.registerDocumentLinkProvider(selector, new LinkProvider()),
/* FIXME : activate
vscode.languages.registerFoldingRangeProvider(selector, new TextileFoldingProvider(engine)),
*/
vscode.languages.registerWorkspaceSymbolProvider(new TextileWorkspaceSymbolProvider(symbolProvider))
);
}
Expand Down
Loading

0 comments on commit f6c9471

Please sign in to comment.