From 88394a6165b2a96f084f95ae770d1d3824530c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baumg=C3=A4rtner?= Date: Mon, 1 Oct 2018 09:29:03 +0200 Subject: [PATCH 1/5] fix #6; refactoring --- src/markupParser.ts | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/markupParser.ts b/src/markupParser.ts index cf8106f..1a25fc1 100644 --- a/src/markupParser.ts +++ b/src/markupParser.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; const EXTENTION_ID = 'denco.confluence-markup'; -const EMOTICON_PATH = '/resources/emoticons/'; -const CSS_PATH = '/resources/css/'; +const EMOTICON_PATH = '/media/emoticons/'; +const CSS_PATH = '/media/css/'; function imageUri(searchUri: vscode.Uri, imageLink: string) { let imageUri @@ -19,16 +19,21 @@ function imageUri(searchUri: vscode.Uri, imageLink: string) { return imageUri; } +function getUri(filepath: string, filename: string){ + let extension = vscode.extensions.getExtension(EXTENTION_ID); + if (extension) { + let extPath = extension.extensionPath; + let uri = vscode.Uri.file(path.join(extPath, filepath, filename)); + return uri; + } +} + function emoticonUri(emoticonFile: string) { - let extPath = vscode.extensions.getExtension(EXTENTION_ID).extensionPath; - let emoticonUri = vscode.Uri.file(path.join(extPath, EMOTICON_PATH, emoticonFile)); - return emoticonUri; + return getUri(EMOTICON_PATH, emoticonFile); } export function cssUri(cssFile: string) { - let extPath = vscode.extensions.getExtension(EXTENTION_ID).extensionPath; - let cssUri = vscode.Uri.file(path.join(extPath, CSS_PATH, cssFile)); - return cssUri; + return getUri(CSS_PATH, cssFile); } export async function parseMarkup(sourceUri: vscode.Uri, sourceText: string) { @@ -40,9 +45,9 @@ export async function parseMarkup(sourceUri: vscode.Uri, sourceText: string) { let codeTagFlag = 0; let tableFlag = false; let listFlag = false; - let listArr = []; + let listArr: string[] = []; - for (let entry of sourceText.split(/\n/gi)) { + for (let entry of sourceText.split(/\r?\n/gi)) { let tag = entry; let html_tag = false; @@ -157,9 +162,6 @@ export async function parseMarkup(sourceUri: vscode.Uri, sourceText: string) { listArr.push(listTag); } if (match[1].length < listArr.length) { - // while (listArr.length > match[1].length) { - // tag += '' - // } tag = ''; listArr = listArr.slice(0, match[1].length); } @@ -168,11 +170,7 @@ export async function parseMarkup(sourceUri: vscode.Uri, sourceText: string) { if ((tag.length === 0) && (listArr.length > 0)) { - // if ((!listFlag) && (listArr.length > 0)) { tag = ''; - // do { - // tag += '' - // } while (listArr.length > 0); tag = '' listArr = []; listFlag = false; @@ -206,8 +204,6 @@ export async function parseMarkup(sourceUri: vscode.Uri, sourceText: string) { } result += tag; - - // console.log("PARSED:" + tag); } return result; From 465d77ac91a1ffcc5399ece678aa749d620e3b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baumg=C3=A4rtner?= Date: Mon, 1 Oct 2018 09:30:01 +0200 Subject: [PATCH 2/5] configure win/nix test files --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..13f5c69 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto +/src/test/testfiles/nix/**/*.confluence text eol=lf +/src/test/testfiles/win/**/*.confluence text eol=crlf From e684668310678729909ace9f164880dddf3f8dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baumg=C3=A4rtner?= Date: Mon, 1 Oct 2018 09:31:23 +0200 Subject: [PATCH 3/5] fix links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 29659ea..9cfb7c3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # Confluence® markup language support for Visual Studio Code [![The MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://github.com/denco/vscode-confluence-markup/blob/master/LICENSE) -[![Version](https://vsmarketplacebadge.apphb.com/version/denco.confluence-markup.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup) +[![Version](https://vsmarketplacebadge.apphb.com/version-short/denco.confluence-markup.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup) [![Installs](https://vsmarketplacebadge.apphb.com/installs-short/denco.confluence-markup.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup) -[![Ratings](https://vsmarketplacebadge.apphb.com/rating/denco.confluence-markdown.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup) +[![Rating](https://vsmarketplacebadge.apphb.com/rating-short/denco.confluence-markup.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup) Adds syntax highlighting, snippets and preview for Confluence® Wiki files in Visual Studio Code. From d6d4fad9ffba3bc8e40d951df150066d2a181b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baumg=C3=A4rtner?= Date: Mon, 1 Oct 2018 09:32:22 +0200 Subject: [PATCH 4/5] restructure --- .vscode/settings.json | 3 +- .vscodeignore | 10 +- {resources => media}/css/confluence.css | 0 {resources => media}/emoticons/biggrin.png | Bin {resources => media}/emoticons/check.png | Bin {resources => media}/emoticons/error.png | Bin .../emoticons/information.png | Bin {resources => media}/emoticons/sad.png | Bin {resources => media}/emoticons/smile.png | Bin .../emoticons/thumbs_down.png | Bin {resources => media}/emoticons/thumbs_up.png | Bin {resources => media}/emoticons/tongue.png | Bin {resources => media}/emoticons/warning.png | Bin {resources => media}/emoticons/wink.png | Bin .../logo/confluence-markup.png | Bin package.json | 22 ++-- src/extension.ts | 7 +- src/test/.vscode/settings.json | 4 + {test => src/test}/extension.test.ts | 17 +-- test/test.ts => src/test/index.ts | 7 +- src/test/testfiles/nix/issue_6.confluence | 20 +++ src/test/testfiles/nix/issues.confluence | 53 ++++++++ .../testfiles/nix/scoped/headings.confluence | 11 ++ .../testfiles/nix/scoped}/lists.confluence | 93 ++++++++------ .../testfiles/nix/scoped}/tables.confluence | 19 +-- .../test/testfiles/nix}/test.confluence | 0 src/test/testfiles/win/issue_6.confluence | 20 +++ src/test/testfiles/win/issues.confluence | 53 ++++++++ .../testfiles/win/scoped/headings.confluence | 11 ++ .../testfiles/win/scoped/lists.confluence | 95 +++++++++++++++ .../testfiles/win/scoped/tables.confluence | 29 +++++ src/test/testfiles/win/test.confluence | 115 ++++++++++++++++++ test/testfiles/issues.confluence | 36 ------ tsconfig.json | 6 +- 34 files changed, 518 insertions(+), 113 deletions(-) rename {resources => media}/css/confluence.css (100%) rename {resources => media}/emoticons/biggrin.png (100%) rename {resources => media}/emoticons/check.png (100%) rename {resources => media}/emoticons/error.png (100%) rename {resources => media}/emoticons/information.png (100%) rename {resources => media}/emoticons/sad.png (100%) rename {resources => media}/emoticons/smile.png (100%) rename {resources => media}/emoticons/thumbs_down.png (100%) rename {resources => media}/emoticons/thumbs_up.png (100%) rename {resources => media}/emoticons/tongue.png (100%) rename {resources => media}/emoticons/warning.png (100%) rename {resources => media}/emoticons/wink.png (100%) rename {resources => media}/logo/confluence-markup.png (100%) create mode 100644 src/test/.vscode/settings.json rename {test => src/test}/extension.test.ts (58%) rename test/test.ts => src/test/index.ts (80%) create mode 100644 src/test/testfiles/nix/issue_6.confluence create mode 100644 src/test/testfiles/nix/issues.confluence create mode 100644 src/test/testfiles/nix/scoped/headings.confluence rename {test/testfiles => src/test/testfiles/nix/scoped}/lists.confluence (50%) rename {test/testfiles => src/test/testfiles/nix/scoped}/tables.confluence (62%) rename {test => src/test/testfiles/nix}/test.confluence (100%) create mode 100644 src/test/testfiles/win/issue_6.confluence create mode 100644 src/test/testfiles/win/issues.confluence create mode 100644 src/test/testfiles/win/scoped/headings.confluence create mode 100644 src/test/testfiles/win/scoped/lists.confluence create mode 100644 src/test/testfiles/win/scoped/tables.confluence create mode 100644 src/test/testfiles/win/test.confluence delete mode 100644 test/testfiles/issues.confluence diff --git a/.vscode/settings.json b/.vscode/settings.json index e2d478e..6ba6786 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,7 +10,8 @@ "files.exclude": { "out": true, "node_modules": true, - ".vscode*": true + "**/.vscode": true, + "**/.vscode-*": true }, "files.trimTrailingWhitespace": true, diff --git a/.vscodeignore b/.vscodeignore index f4766eb..6baa775 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -2,12 +2,14 @@ **/tsconfig.json **/*.map **/*.bak +**/*.log *.vsix -.gitignore .vscode/** .vscode-test/** +node_modules/** +typings/** +**/test/** +.gitignore +.gitattributes tsconfig.json package-lock.json -test/** -node_modules/** -typings/** \ No newline at end of file diff --git a/resources/css/confluence.css b/media/css/confluence.css similarity index 100% rename from resources/css/confluence.css rename to media/css/confluence.css diff --git a/resources/emoticons/biggrin.png b/media/emoticons/biggrin.png similarity index 100% rename from resources/emoticons/biggrin.png rename to media/emoticons/biggrin.png diff --git a/resources/emoticons/check.png b/media/emoticons/check.png similarity index 100% rename from resources/emoticons/check.png rename to media/emoticons/check.png diff --git a/resources/emoticons/error.png b/media/emoticons/error.png similarity index 100% rename from resources/emoticons/error.png rename to media/emoticons/error.png diff --git a/resources/emoticons/information.png b/media/emoticons/information.png similarity index 100% rename from resources/emoticons/information.png rename to media/emoticons/information.png diff --git a/resources/emoticons/sad.png b/media/emoticons/sad.png similarity index 100% rename from resources/emoticons/sad.png rename to media/emoticons/sad.png diff --git a/resources/emoticons/smile.png b/media/emoticons/smile.png similarity index 100% rename from resources/emoticons/smile.png rename to media/emoticons/smile.png diff --git a/resources/emoticons/thumbs_down.png b/media/emoticons/thumbs_down.png similarity index 100% rename from resources/emoticons/thumbs_down.png rename to media/emoticons/thumbs_down.png diff --git a/resources/emoticons/thumbs_up.png b/media/emoticons/thumbs_up.png similarity index 100% rename from resources/emoticons/thumbs_up.png rename to media/emoticons/thumbs_up.png diff --git a/resources/emoticons/tongue.png b/media/emoticons/tongue.png similarity index 100% rename from resources/emoticons/tongue.png rename to media/emoticons/tongue.png diff --git a/resources/emoticons/warning.png b/media/emoticons/warning.png similarity index 100% rename from resources/emoticons/warning.png rename to media/emoticons/warning.png diff --git a/resources/emoticons/wink.png b/media/emoticons/wink.png similarity index 100% rename from resources/emoticons/wink.png rename to media/emoticons/wink.png diff --git a/resources/logo/confluence-markup.png b/media/logo/confluence-markup.png similarity index 100% rename from resources/logo/confluence-markup.png rename to media/logo/confluence-markup.png diff --git a/package.json b/package.json index 251f5a7..978f32b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "confluence-markup", "displayName": "Confluence markup", - "version": "0.1.3", + "version": "0.1.4", "publisher": "denco", "description": "Confluence markup language support for Visual Studio Code", "keywords": [ @@ -11,12 +11,12 @@ "wiki", "markup" ], - "icon": "resources/logo/confluence-markup.png", + "icon": "media/logo/confluence-markup.png", "author": { "name": "denco" }, "categories": [ - "Languages", + "Programming Languages", "Snippets" ], "preview": true, @@ -37,7 +37,7 @@ "onCommand:confluence.showPreviewToSide", "onLanguage:confluence" ], - "main": "./out/src/extension", + "main": "./out/extension", "contributes": { "languages": [ { @@ -116,13 +116,13 @@ "test": "npm run compile && node ./node_modules/vscode/bin/test" }, "devDependencies": { - "@types/mocha": "^2.2.42", - "@types/node": "^7.0.59", - "eslint": "^4.15.0", - "tslint": "^5.9.1", - "typescript": "^2.6.1", - "vsce": "^1.40.0", - "vscode": "^1.1.6" + "@types/mocha": "^5.2.5", + "@types/node": "^10.10.1", + "eslint": "^5.6.0", + "tslint": "^5.11.0", + "typescript": "^3.0.3", + "vsce": "^1.51.0", + "vscode": "^1.1.21" }, "__metadata": { "publisherDisplayName": "denco" diff --git a/src/extension.ts b/src/extension.ts index eed4c02..384b6dc 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -49,8 +49,11 @@ export function activate(context: vscode.ExtensionContext) { }); vscode.workspace.onDidChangeTextDocument(e => { - if (e.document === vscode.window.activeTextEditor.document) { - contentProvider.update(packConfluenceUri(e.document.uri)); + let editor = vscode.window.activeTextEditor; + if (editor) { + if (e.document === editor.document) { + contentProvider.update(packConfluenceUri(e.document.uri)); + } } }); diff --git a/src/test/.vscode/settings.json b/src/test/.vscode/settings.json new file mode 100644 index 0000000..5d9d13d --- /dev/null +++ b/src/test/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "telemetry.enableCrashReporter": false, + "telemetry.enableTelemetry": false +} \ No newline at end of file diff --git a/test/extension.test.ts b/src/test/extension.test.ts similarity index 58% rename from test/extension.test.ts rename to src/test/extension.test.ts index fec06d3..a7a297f 100644 --- a/test/extension.test.ts +++ b/src/test/extension.test.ts @@ -2,20 +2,21 @@ // Note: This example test is leveraging the Mocha test framework. // Please refer to their documentation on https://mochajs.org/ for help. // + // The module 'assert' provides assertion methods from node import * as assert from 'assert'; // You can import and use all API from the 'vscode' module // as well as import your extension to test it -import * as vscode from 'vscode'; -import * as myExtension from '../src/extension'; +// import * as vscode from 'vscode'; +// import * as myExtension from '../extension'; // Defines a Mocha test suite to group tests of similar kind together -suite("Extension Tests", () => { +suite("Extension Tests", function () { - // Defines a Mocha unit test - test("Something 1", () => { - assert.equal(-1, [1, 2, 3].indexOf(5)); - assert.equal(-1, [1, 2, 3].indexOf(0)); - }); + // Defines a Mocha unit test + test("Something 1", function() { + assert.equal(-1, [1, 2, 3].indexOf(5)); + assert.equal(-1, [1, 2, 3].indexOf(0)); + }); }); \ No newline at end of file diff --git a/test/test.ts b/src/test/index.ts similarity index 80% rename from test/test.ts rename to src/test/index.ts index ea13c1d..9fa2ea0 100644 --- a/test/test.ts +++ b/src/test/index.ts @@ -9,13 +9,14 @@ // host can call to run the tests. The test runner is expected to use console.log // to report the results back to the caller. When the tests are finished, return // a possible error to the callback or null if none. -var testRunner = require('vscode/lib/testrunner'); + +import * as testRunner from 'vscode/lib/testrunner'; // You can directly control Mocha options by uncommenting the following lines // See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info testRunner.configure({ - ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) - useColors: true // colored output from test results + ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) + useColors: true // colored output from test results }); module.exports = testRunner; \ No newline at end of file diff --git a/src/test/testfiles/nix/issue_6.confluence b/src/test/testfiles/nix/issue_6.confluence new file mode 100644 index 0000000..adc9ff2 --- /dev/null +++ b/src/test/testfiles/nix/issue_6.confluence @@ -0,0 +1,20 @@ +h1. TITLE + +h2. Section One + +Section one. + +h2. Section Two + +Section two. + +# Numbered List 1 +# Numbered List 2 + +h2. Section Three + +Section three. + +h2. Section Four + +Section four. \ No newline at end of file diff --git a/src/test/testfiles/nix/issues.confluence b/src/test/testfiles/nix/issues.confluence new file mode 100644 index 0000000..3afeee0 --- /dev/null +++ b/src/test/testfiles/nix/issues.confluence @@ -0,0 +1,53 @@ +h1. *Issues* + +[#3|https://github.com/denco/vscode-confluence-markup/issues/3]: Noformat macro + +{noformat} +$ date -R -v+1d +Sat, 10 Feb 2018 10:37:39 +0100 +{noformat} + +[#5|https://github.com/denco/vscode-confluence-markup/issues/5]: Table without heading + +h4. Table without heading + +|test|test| +|simple table|two| + +[#6|https://github.com/denco/vscode-confluence-markup/issues/6]: Intenting + +h4. Header Four +- list one +- list two +- list three + +h4. next header (should not be indented) +* list +* list two + +h3. third header +- one +- two + +[#7|https://github.com/denco/vscode-confluence-markup/issues/7]: Nested lists + +* el. 1 +** el. 1.2. +** el. 1.3. +*** el. 1.3.1 +* el. 2 + +- el. 1 +-- el. 1.2. +-- el. 1.3. +--- el. 1.3.1 +- el. 2 + +# el. 1 +## el. 1.2. +## el. 1.3. +### el. 1.3.1 +# el. 2 + +[#8|https://github.com/denco/vscode-confluence-markup/issues/8]: +Dublicate of [#5|https://github.com/denco/vscode-confluence-markup/issues/5] diff --git a/src/test/testfiles/nix/scoped/headings.confluence b/src/test/testfiles/nix/scoped/headings.confluence new file mode 100644 index 0000000..a715ddd --- /dev/null +++ b/src/test/testfiles/nix/scoped/headings.confluence @@ -0,0 +1,11 @@ +h1. Heading 1 + +h2. Heading 2 + +h3. Heading 3 + +h4. Heading 4 + +h5. Heading 5 + +h6. Heading 6 diff --git a/test/testfiles/lists.confluence b/src/test/testfiles/nix/scoped/lists.confluence similarity index 50% rename from test/testfiles/lists.confluence rename to src/test/testfiles/nix/scoped/lists.confluence index 7136a39..101e0c7 100644 --- a/test/testfiles/lists.confluence +++ b/src/test/testfiles/nix/scoped/lists.confluence @@ -1,12 +1,16 @@ h1. Lists +h2. Ordered + +h3. Simple + # one # two -## nested one -## nested two # three +# four + +h3. Nested ----- # one # two ## nested one @@ -20,59 +24,72 @@ h1. Lists ####### sub s7 # three ----- +h2. Unordered + +h3. Simple + +h4. "squared" + +- one +- two +- three +- four + +h4. "dotted" + * one * two -** nested one -** nested two -** nested three -*** sub sub -*** sub sub -**** sub s4 -***** sub s5 -****** sub s6 -******* sub s7 * three +* four + +h3. Nested ----- +h4. "squared" - one - two -- nested one -- nested two +-- nested three +--- sub sub +--- sub sub +---- sub s4 +----- sub s5 +------ sub s6 +------- sub s7 - three ----- -h1. Nested Lists + +h4. "dotted" + * one * two ** nested one ** nested two +** nested three +*** sub sub +*** sub sub +**** sub s4 +***** sub s5 +****** sub s6 +******* sub s7 * three ----- -- one -- two --- nested one --- nested two -- three +h2. Mixed + +h3. Nested ----- # one # two -## nested one -## nested two +#- nested one +#- nested two +#- nested three +#-# sub sub +#-# sub sub +#--- sub s4 +#---# sub s5.1 +#---# sub s5.2 +#---#- sub s6 +#---#-# sub s7.1 +#---#-# sub s7.2 # three - ----- -h4. Header Four -- list one -- list two -- list three -h4. Next header (indented) - ----- -h4. Other Header Four -- list one -- list two -- list three diff --git a/test/testfiles/tables.confluence b/src/test/testfiles/nix/scoped/tables.confluence similarity index 62% rename from test/testfiles/tables.confluence rename to src/test/testfiles/nix/scoped/tables.confluence index a264951..26afb71 100644 --- a/test/testfiles/tables.confluence +++ b/src/test/testfiles/nix/scoped/tables.confluence @@ -1,24 +1,29 @@ h1. Tables -* multiline table -||Heading 1||Heading 2|| -|* Item 1\\* Item 2\\* Item 3|# Item 1 \\# Item 2\\# Item 3| +h2. Column heading -* column heading ||header c1||header c2|| |data 1.1|data 1.2| |data 2.1|data 2.2| -* row heading +h2. Row heading + ||header r1|data 1.1|data 1.2 ||header r2|data 2.1|data 2.2 ||header r3|data 3.1|data 3.2 -* with column and row heading +h2. Column and row heading + || ||header c1||header c2 ||header r1|data 1.1|data 1.2| ||header r2|data 2.1|data 2.2| -* headless +h2. Without heading + |data 1.1|data 1.2| |data 2.1|data 2.2| + +h2. Table with nested macros (not supported yet) + +||Heading 1||Heading 2|| +|* Item 1\\* Item 2\\* Item 3|# Item 1 \\# Item 2\\# Item 3| \ No newline at end of file diff --git a/test/test.confluence b/src/test/testfiles/nix/test.confluence similarity index 100% rename from test/test.confluence rename to src/test/testfiles/nix/test.confluence diff --git a/src/test/testfiles/win/issue_6.confluence b/src/test/testfiles/win/issue_6.confluence new file mode 100644 index 0000000..adc9ff2 --- /dev/null +++ b/src/test/testfiles/win/issue_6.confluence @@ -0,0 +1,20 @@ +h1. TITLE + +h2. Section One + +Section one. + +h2. Section Two + +Section two. + +# Numbered List 1 +# Numbered List 2 + +h2. Section Three + +Section three. + +h2. Section Four + +Section four. \ No newline at end of file diff --git a/src/test/testfiles/win/issues.confluence b/src/test/testfiles/win/issues.confluence new file mode 100644 index 0000000..3afeee0 --- /dev/null +++ b/src/test/testfiles/win/issues.confluence @@ -0,0 +1,53 @@ +h1. *Issues* + +[#3|https://github.com/denco/vscode-confluence-markup/issues/3]: Noformat macro + +{noformat} +$ date -R -v+1d +Sat, 10 Feb 2018 10:37:39 +0100 +{noformat} + +[#5|https://github.com/denco/vscode-confluence-markup/issues/5]: Table without heading + +h4. Table without heading + +|test|test| +|simple table|two| + +[#6|https://github.com/denco/vscode-confluence-markup/issues/6]: Intenting + +h4. Header Four +- list one +- list two +- list three + +h4. next header (should not be indented) +* list +* list two + +h3. third header +- one +- two + +[#7|https://github.com/denco/vscode-confluence-markup/issues/7]: Nested lists + +* el. 1 +** el. 1.2. +** el. 1.3. +*** el. 1.3.1 +* el. 2 + +- el. 1 +-- el. 1.2. +-- el. 1.3. +--- el. 1.3.1 +- el. 2 + +# el. 1 +## el. 1.2. +## el. 1.3. +### el. 1.3.1 +# el. 2 + +[#8|https://github.com/denco/vscode-confluence-markup/issues/8]: +Dublicate of [#5|https://github.com/denco/vscode-confluence-markup/issues/5] diff --git a/src/test/testfiles/win/scoped/headings.confluence b/src/test/testfiles/win/scoped/headings.confluence new file mode 100644 index 0000000..a715ddd --- /dev/null +++ b/src/test/testfiles/win/scoped/headings.confluence @@ -0,0 +1,11 @@ +h1. Heading 1 + +h2. Heading 2 + +h3. Heading 3 + +h4. Heading 4 + +h5. Heading 5 + +h6. Heading 6 diff --git a/src/test/testfiles/win/scoped/lists.confluence b/src/test/testfiles/win/scoped/lists.confluence new file mode 100644 index 0000000..101e0c7 --- /dev/null +++ b/src/test/testfiles/win/scoped/lists.confluence @@ -0,0 +1,95 @@ +h1. Lists + +h2. Ordered + +h3. Simple + +# one +# two +# three +# four + +h3. Nested + +# one +# two +## nested one +## nested two +## nested three +### sub sub +### sub sub +#### sub s4 +##### sub s5 +###### sub s6 +####### sub s7 +# three + +h2. Unordered + +h3. Simple + +h4. "squared" + +- one +- two +- three +- four + +h4. "dotted" + +* one +* two +* three +* four + +h3. Nested + +h4. "squared" + +- one +- two +-- nested one +-- nested two +-- nested three +--- sub sub +--- sub sub +---- sub s4 +----- sub s5 +------ sub s6 +------- sub s7 +- three + + +h4. "dotted" + +* one +* two +** nested one +** nested two +** nested three +*** sub sub +*** sub sub +**** sub s4 +***** sub s5 +****** sub s6 +******* sub s7 +* three + +h2. Mixed + +h3. Nested + +# one +# two +#- nested one +#- nested two +#- nested three +#-# sub sub +#-# sub sub +#--- sub s4 +#---# sub s5.1 +#---# sub s5.2 +#---#- sub s6 +#---#-# sub s7.1 +#---#-# sub s7.2 +# three diff --git a/src/test/testfiles/win/scoped/tables.confluence b/src/test/testfiles/win/scoped/tables.confluence new file mode 100644 index 0000000..26afb71 --- /dev/null +++ b/src/test/testfiles/win/scoped/tables.confluence @@ -0,0 +1,29 @@ +h1. Tables + +h2. Column heading + +||header c1||header c2|| +|data 1.1|data 1.2| +|data 2.1|data 2.2| + +h2. Row heading + +||header r1|data 1.1|data 1.2 +||header r2|data 2.1|data 2.2 +||header r3|data 3.1|data 3.2 + +h2. Column and row heading + +|| ||header c1||header c2 +||header r1|data 1.1|data 1.2| +||header r2|data 2.1|data 2.2| + +h2. Without heading + +|data 1.1|data 1.2| +|data 2.1|data 2.2| + +h2. Table with nested macros (not supported yet) + +||Heading 1||Heading 2|| +|* Item 1\\* Item 2\\* Item 3|# Item 1 \\# Item 2\\# Item 3| \ No newline at end of file diff --git a/src/test/testfiles/win/test.confluence b/src/test/testfiles/win/test.confluence new file mode 100644 index 0000000..871376e --- /dev/null +++ b/src/test/testfiles/win/test.confluence @@ -0,0 +1,115 @@ + +h1. *Examples* + +---- +h2. *headers:* + +h1. Header 1 +h2. Header 2 +h3. Header 3 +h4. Header 4 +h5. Header 5 +h6. Header 6 + +---- +h2. *smiles:* + +* :) smile :) +* :( sad :( +* :P tongue +* :D laugh +* ;) *wink* +* (y) +* (n) +* (i) +* (/) +* (x) +* (!) + +---- +h2. *Links:* + +* [Mark Up|https://confluence.atlassian.com/doc/confluence-wiki-markup-251003035.html#ConfluenceWikiMarkup-Headings] +* [Storage Format|https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html] +* [html format|https://www.w3schools.com/html/html_formatting.asp] +* [test|https://ifl2014.github.io/submissions/ifl2014_submission_18.pdf] + +---- +h2. *text effects:* + +*strong* + +*bold text* + +_emphasis_ + +_italics_ : Thing_x_ + +_italics with spaces_ + +??citation?? \\ + +-deleted- \\ +-deleted with spaces- \\ ++inserted+ \\ +Text with ^superscript^ : kg/m^3^ + +Text with ~subscript~ + +{{monospaced}} + +bq. Here's how you make a paragraph appear as a block quotation. + +{color:red}look ma, red text!{color} + +---- +h2. *lists:* + +Squared list +- one +- two + +Dotted list +* one +* tree +* third + +Numbered list +# one +#* borderStyle +#* dasddasd +# two +# :) + +---- +h2. *table:* + +||heading 1||heading 2||heading 3|| +|cell A1|cell A2|cell A3| +|cell B1|cell B2|cell B3| + + +---- +h2. *code:* + +{code:language=xml|title=test} + + + +{code} + +{code:language=sh|title=title|borderStyle=solid} +bash +{code} + +{code}code oneline{code} + +---- +h2. *noformat:* + +{noformat} + + +{noformat} + +{noformat}noformat oneline{noformat} diff --git a/test/testfiles/issues.confluence b/test/testfiles/issues.confluence deleted file mode 100644 index 7bbf963..0000000 --- a/test/testfiles/issues.confluence +++ /dev/null @@ -1,36 +0,0 @@ -h1. *Issues* - -[#3|https://github.com/denco/vscode-confluence-markup/issues/3] - -{noformat} -$ date -R -v+1d -Sat, 10 Feb 2018 10:37:39 +0100 -{noformat} - -[#5|https://github.com/denco/vscode-confluence-markup/issues/5] - -h4. Table without heading - -|test|test| -|simple table|two| - -[#6|https://github.com/denco/vscode-confluence-markup/issues/6] - -h4. Header Four -- list one -- list two -- list three - -h4. next header (should not be indented) -* list -* list two - -h3. third header -- one -- two - -[#7|https://github.com/denco/vscode-confluence-markup/issues/7] - -* el. 1 -** el. 1.1 -** el. 1.2 \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 5998779..062149c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,12 +8,12 @@ "es6" ], "sourceMap": true, - "rootDir": "./", - // "strict": true, + "rootDir": "src", + "strict": true, }, "exclude": [ "node_modules", ".vscode-test", // "test" ] -} \ No newline at end of file +} From 9533c4e0a4018a19e165e9cb8b4f0926125861c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Baumg=C3=A4rtner?= Date: Mon, 1 Oct 2018 09:39:01 +0200 Subject: [PATCH 5/5] add changes --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0b672d..3c61fdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Confluence Wiki Markup +## 0.1.4 +* fix [List indenting @win](https://github.com/denco/vscode-confluence-markup/issues/6) +* restructure +* win/nix test files + ## 0.1.3 * fix [nested lists](https://github.com/denco/vscode-confluence-markup/issues/7)