diff --git a/.gitattributes b/.gitattributes
index 13f5c69..1562bd4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,3 @@
* text=auto
-/src/test/testfiles/nix/**/*.confluence text eol=lf
-/src/test/testfiles/win/**/*.confluence text eol=crlf
+**/nix/**/*.confluence text eol=lf
+**/win/**/*.confluence text eol=crlf
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77f628e..07ec963 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Confluence Wiki Markup
+## [0.1.9](https://github.com/denco/vscode-confluence-markup/releases/tag/0.1.9)
+
+- fix [Can't use [ and ] in string](https://github.com/denco/vscode-confluence-markup/issues/24)
+- add panel macro support [panel support](https://github.com/denco/vscode-confluence-markup/issues/22)
+- add bages for [Open VSX Registry](https://open-vsx.org/)
+- use bages from [shilds.io](https://shields.io/)
+- migrate from `vscode` dependency to `@types/vscode` and `vscode-test`, s. [Migrating from `vscode`](https://code.visualstudio.com/api/working-with-extensions/testing-extension#migrating-from-vscode)
+
## [0.1.8](https://github.com/denco/vscode-confluence-markup/releases/tag/0.1.8)
- fix [Multiply inline monospace macro](https://github.com/denco/vscode-confluence-markup/issues/17)
diff --git a/README.md b/README.md
index 6153556..416ae49 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,16 @@
# 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-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)
-[![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/denco.confluence-markup.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)
+[![The MIT License](https://img.shields.io/badge/license-MIT-brightgreen.svg?label=License&style=flat-square)](https://github.com/denco/vscode-confluence-markup/blob/master/LICENSE)
+
+[![Version](https://img.shields.io/visual-studio-marketplace/v/denco.confluence-markup?color=%230066B8&label=VS%20Marketplace&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup)
+[![Installs](https://img.shields.io/visual-studio-marketplace/i/denco.confluence-markup?color=%230066B8&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup)
+[![Downloads](https://img.shields.io/visual-studio-marketplace/d/denco.confluence-markup?color=%230066B8&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup)
+[![Rating](https://img.shields.io/visual-studio-marketplace/r/denco.confluence-markup?color=0066B8&style=flat-square)](https://marketplace.visualstudio.com/items?itemName=denco.confluence-markup)
+
+[![Version](https://img.shields.io/open-vsx/v/denco/confluence-markup?color=%23a60ee5&label=Open%20VSX&style=flat-square)](https://open-vsx.org/extension/denco/confluence-markup)
+[![Downloads](https://img.shields.io/open-vsx/dt/denco/confluence-markup?color=%23a60ee5&style=flat-square)](https://open-vsx.org/extension/denco/confluence-markup)
+[![Rating](https://img.shields.io/open-vsx/rating/denco/confluence-markup?color=%23a60ee5&style=flat-square)](https://open-vsx.org/extension/denco/confluence-markup)
+
## Description
diff --git a/media/css/confluence.css b/media/css/confluence.css
index 61810b1..8be7fa9 100644
--- a/media/css/confluence.css
+++ b/media/css/confluence.css
@@ -1,15 +1,5 @@
body {
- font-family: -apple-system,
- BlinkMacSystemFont,
- "Segoe UI",
- Roboto,
- Helvetica,
- Arial,
- sans-serif,
- "Apple Color Emoji",
- "Segoe UI Emoji",
- "Segoe UI Symbol";
- font-size: 14px;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
padding: 0 26px;
line-height: 1em;
word-wrap: break-word;
@@ -24,11 +14,7 @@ a {
color: #4080D0;
text-decoration: none;
}
-
-a:focus,
-input:focus,
-select:focus,
-textarea:focus {
+a:focus, input:focus, select:focus, textarea:focus {
outline: 1px solid -webkit-focus-ring-color;
outline-offset: -1px;
}
@@ -46,9 +32,7 @@ h1 {
border-bottom-style: solid;
}
-h1,
-h2,
-h3 {
+h1, h2, h3 {
font-weight: normal;
}
@@ -58,29 +42,49 @@ blockquote {
border-left: 5px solid;
}
-table,
-th,
-td {
+table, th, td {
border: 1px solid;
border-collapse: collapse;
padding: 7px;
}
-pre>code {
- display: inline-block;
- width: 90%;
- color: white;
+pre > code {
+ display: block;
+ background:rgba(0, 0, 0, 0.15);
+ word-wrap: break-word;
+ overflow-wrap: break-word;
+ word-break: break-all;
+ white-space: normal;
margin: 0px 5px;
- font-size: 14px;
- background-color: black;
- cursor: pointer;
padding: 5px 1em;
- box-shadow: 1px 1px 1px rgba(0, 0, 0, .25);
line-height: 1.5em;
}
+
+.panel {
+ display: inline-block;
+ width: 90%;
+ color: black;
+ margin: 0px;
+ background-color: lightslategrey;
+ border-width: 1px;
+
+}
+
+.panel-title {
+ font-weight: bold;
+ padding: 5px 3px;
+ border-bottom: none;
+}
+
+.panel-body {
+ background-color: lightgrey;
+ padding: 3px;
+}
+
+
pre > code > p {
- margin: 0px
+ margin: 0px;
}
ul {
@@ -95,10 +99,10 @@ ol.initial {
list-style: decimal;
}
-ol.initial>ol {
+ol.initial > ol {
list-style-type: lower-alpha;
}
-ol.initial>ol>ol {
+ol.initial > ol > ol {
list-style-type: lower-roman;
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index 38b13d4..252032b 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "confluence-markup",
"displayName": "Confluence markup",
- "version": "0.1.8",
+ "version": "0.1.9",
"publisher": "denco",
"description": "Confluence markup language support for Visual Studio Code",
"keywords": [
@@ -124,19 +124,25 @@
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
- "postinstall": "node ./node_modules/vscode/bin/install",
- "test": "npm run clean && npm run compile && node ./node_modules/vscode/bin/test",
+ "pretest": "npm run clean && npm run compile",
+ "test": "node ./out/test/runTest.js",
+ "prepackage": "npm run clean && npm run compile",
"package": "./node_modules/.bin/vsce package",
"clean": "rm -rf ./out",
"clean-all": "rm -f ./confluence-markup*.vsix; rm -rf ./.vscode-test; rm -rf ./out; rm -rf ./node_modules"
},
"devDependencies": {
+ "@types/glob": "^7.1.1",
"@types/mocha": "^5.2.7",
- "@types/node": "^12.12.7",
+ "@types/node": "^12.12.8",
+ "@types/vscode": "^1.40.0",
"tslint": "^5.18.0",
"typescript": "^3.5.3",
"vsce": "^1.66.0",
- "vscode": "^1.1.36",
+ "vscode-test": "^1.2.3",
+ "glob": "^7.1.4",
+ "mocha": "^6.1.4",
+ "source-map-support": "^0.5.12",
"html-formatter": "^0.1.9"
},
"__metadata": {
diff --git a/src/markupParser.ts b/src/markupParser.ts
index 91c2193..c95090e 100644
--- a/src/markupParser.ts
+++ b/src/markupParser.ts
@@ -49,6 +49,7 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
let listTag = '';
let listStyle = '';
let codeTagFlag = false;
+ let panelTagFlag = false;
let tableFlag = false;
let listFlag = false;
let listArr: string[] = [];
@@ -94,9 +95,10 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
tag = tag.replace(/\\\\/gi, '
');
- let re = /\[([^|]*)?\|?([^|]*)\]/g
- if (tag.match(re)) {
- tag = tag.replace(re, function (m0, m1, m2) {
+ let re_href = /\[(\S[^|]*)?\|?([^|].*[^\\|\s+])\]/g
+ let esc_href = /\[\s*([^|]*)?\|?([^|].*)[\s+|\\]\]/g
+ if (tag.match(re_href)) {
+ tag = tag.replace(re_href, function (m0, m1, m2) {
if ((m1.length !== 0) && (m2.length !== 0)) {
return "" + m1 + "";
} else {
@@ -104,6 +106,8 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
}
});
html_tag = true;
+ } else if (tag.match(esc_href)){
+ tag = tag.replace('\\','').replace('|', '|')
}
//img
let img = /!([^|]*)\|?.*!/;
@@ -113,9 +117,9 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
}
//Table
- let tab_th_re = /\s*\|{2}.*$/gi;
- let tab_td_re = /\s*\|.*$/gi;
- if (tag.match(tab_th_re) || tag.match(tab_td_re)) {
+ let tab_th_re = /\s*[^{]*\|{2}[^}]*$/gi;
+ let tab_td_re = /\s*[^{]*\|[^}]*$/gi;
+ if (!html_tag && (tag.match(tab_th_re) || tag.match(tab_td_re))) {
tag = tag.replace(/^\|{2,}/, '\|\|');
tag = tag.replace(/^\|{2}/, '
" + tag + "
"; } diff --git a/src/test/index.ts b/src/test/index.ts deleted file mode 100644 index 9fa2ea0..0000000 --- a/src/test/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// -// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING -// -// This file is providing the test runner to use when running extension tests. -// By default the test runner in use is Mocha based. -// -// You can provide your own test runner if you want to override it by exporting -// a function run(testRoot: string, clb: (error:Error) => void) that the extension -// 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. - -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 -}); - -module.exports = testRunner; \ No newline at end of file diff --git a/src/test/runTest.ts b/src/test/runTest.ts new file mode 100644 index 0000000..704f46e --- /dev/null +++ b/src/test/runTest.ts @@ -0,0 +1,24 @@ + +import * as path from 'path'; + +import { runTests } from 'vscode-test'; + +async function main() { + try { + // The folder containing the Extension Manifest package.json + // Passed to `--extensionDevelopmentPath` + const extensionDevelopmentPath = path.resolve(__dirname, '../../'); + + // The path to the extension test script + // Passed to --extensionTestsPath + const extensionTestsPath = path.resolve(__dirname, './suite/index'); + + // Download VS Code, unzip it and run the integration test + await runTests({ extensionDevelopmentPath, extensionTestsPath }); + } catch (err) { + console.error('Failed to run tests'); + process.exit(1); + } +} + +main(); \ No newline at end of file diff --git a/src/test/resources/fixtures/issue_6.html b/src/test/suite/fixtures/expected/issue_6.html similarity index 100% rename from src/test/resources/fixtures/issue_6.html rename to src/test/suite/fixtures/expected/issue_6.html diff --git a/src/test/resources/fixtures/issues.html b/src/test/suite/fixtures/expected/issues.html similarity index 73% rename from src/test/resources/fixtures/issues.html rename to src/test/suite/fixtures/expected/issues.html index 9cdeaf8..4ce4a62 100644 --- a/src/test/resources/fixtures/issues.html +++ b/src/test/suite/fixtures/expected/issues.html @@ -157,4 +157,38 @@Blah blah blah. -
\ No newline at end of file + ++ #22panel support
++
Some text
++
Some text with a title
++
a block of text surrounded with a + panel +
+yet + anotherline
++ #24: Can't use [ and ] in string
++ lala +
+[lalala]
++ text +
+[text|https://link]
+[ text|https://link ]
\ No newline at end of file diff --git a/src/test/resources/fixtures/scoped/colortext.html b/src/test/suite/fixtures/expected/scoped/colortext.html similarity index 100% rename from src/test/resources/fixtures/scoped/colortext.html rename to src/test/suite/fixtures/expected/scoped/colortext.html diff --git a/src/test/resources/fixtures/scoped/headings.html b/src/test/suite/fixtures/expected/scoped/headings.html similarity index 100% rename from src/test/resources/fixtures/scoped/headings.html rename to src/test/suite/fixtures/expected/scoped/headings.html diff --git a/src/test/resources/fixtures/scoped/images.html b/src/test/suite/fixtures/expected/scoped/images.html similarity index 100% rename from src/test/resources/fixtures/scoped/images.html rename to src/test/suite/fixtures/expected/scoped/images.html diff --git a/src/test/resources/fixtures/scoped/lists.html b/src/test/suite/fixtures/expected/scoped/lists.html similarity index 100% rename from src/test/resources/fixtures/scoped/lists.html rename to src/test/suite/fixtures/expected/scoped/lists.html diff --git a/src/test/resources/fixtures/scoped/tables.html b/src/test/suite/fixtures/expected/scoped/tables.html similarity index 100% rename from src/test/resources/fixtures/scoped/tables.html rename to src/test/suite/fixtures/expected/scoped/tables.html diff --git a/src/test/resources/fixtures/test.html b/src/test/suite/fixtures/expected/test.html similarity index 77% rename from src/test/resources/fixtures/test.html rename to src/test/suite/fixtures/expected/test.html index 6f35440..5165571 100644 --- a/src/test/resources/fixtures/test.html +++ b/src/test/suite/fixtures/expected/test.html @@ -38,47 +38,47 @@
@@ -255,29 +255,32 @@
-
-
- <test>
-
-
- <test1 />
-
-
- </test>
-
-
-
-
-
--
-
- bash
-
-
-
-
++
+
+ <test>
+
+
+ <test1 />
+
+
+ </test>
+
+
+
+
+
++
+
+ bash
+
+
+ echo very long command line with a lot of sings to check word wrap and how it looks like && echo much more elements to print
+
+
+
+
diff --git a/src/test/testfiles/media/testing_cat.gif b/src/test/suite/fixtures/testfiles/media/testing_cat.gif similarity index 100% rename from src/test/testfiles/media/testing_cat.gif rename to src/test/suite/fixtures/testfiles/media/testing_cat.gif diff --git a/src/test/testfiles/nix/issue_6.confluence b/src/test/suite/fixtures/testfiles/nix/issue_6.confluence similarity index 100% rename from src/test/testfiles/nix/issue_6.confluence rename to src/test/suite/fixtures/testfiles/nix/issue_6.confluence diff --git a/src/test/testfiles/win/issues.confluence b/src/test/suite/fixtures/testfiles/nix/issues.confluence similarity index 70% rename from src/test/testfiles/win/issues.confluence rename to src/test/suite/fixtures/testfiles/nix/issues.confluence index 5aea630..254947a 100644 --- a/src/test/testfiles/win/issues.confluence +++ b/src/test/suite/fixtures/testfiles/nix/issues.confluence @@ -59,3 +59,30 @@ This is a {{test}} of how things work with {{confluence}} markup. [#18|https://github.com/denco/vscode-confluence-markup/issues/18]: Italic text with dot in the end _Blah blah blah._ + +[#22|https://github.com/denco/vscode-confluence-markup/issues/22] panel support + +{panel} +Some text +{panel} + +{panel:title=My Title} +Some text with a title +{panel} + +{panel:title=My Title|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#FFFFCE} +a block of text surrounded with a *panel* +yet _another_ line +{panel} + +[#24|https://github.com/denco/vscode-confluence-markup/issues/24]: Can't use [ and ] in string + +[lalala] + +[lalala\] + +[text|https://link] + +[text|https://link\] + +[ text|https://link ] diff --git a/src/test/testfiles/nix/scoped/colortext.confluence b/src/test/suite/fixtures/testfiles/nix/scoped/colortext.confluence similarity index 100% rename from src/test/testfiles/nix/scoped/colortext.confluence rename to src/test/suite/fixtures/testfiles/nix/scoped/colortext.confluence diff --git a/src/test/testfiles/nix/scoped/headings.confluence b/src/test/suite/fixtures/testfiles/nix/scoped/headings.confluence similarity index 100% rename from src/test/testfiles/nix/scoped/headings.confluence rename to src/test/suite/fixtures/testfiles/nix/scoped/headings.confluence diff --git a/src/test/testfiles/nix/scoped/images.confluence b/src/test/suite/fixtures/testfiles/nix/scoped/images.confluence similarity index 100% rename from src/test/testfiles/nix/scoped/images.confluence rename to src/test/suite/fixtures/testfiles/nix/scoped/images.confluence diff --git a/src/test/testfiles/nix/scoped/lists.confluence b/src/test/suite/fixtures/testfiles/nix/scoped/lists.confluence similarity index 100% rename from src/test/testfiles/nix/scoped/lists.confluence rename to src/test/suite/fixtures/testfiles/nix/scoped/lists.confluence diff --git a/src/test/testfiles/nix/scoped/tables.confluence b/src/test/suite/fixtures/testfiles/nix/scoped/tables.confluence similarity index 100% rename from src/test/testfiles/nix/scoped/tables.confluence rename to src/test/suite/fixtures/testfiles/nix/scoped/tables.confluence diff --git a/src/test/testfiles/win/test.confluence b/src/test/suite/fixtures/testfiles/nix/test.confluence similarity index 92% rename from src/test/testfiles/win/test.confluence rename to src/test/suite/fixtures/testfiles/nix/test.confluence index b816aa4..6c892aa 100644 --- a/src/test/testfiles/win/test.confluence +++ b/src/test/suite/fixtures/testfiles/nix/test.confluence @@ -100,6 +100,7 @@ h2. *code:* {code:language=sh|title=title|borderStyle=solid} bash +echo very long command line with a lot of sings to check word wrap and how it looks like && echo much more elements to print {code} {code}code oneline{code} diff --git a/src/test/testfiles/win/issue_6.confluence b/src/test/suite/fixtures/testfiles/win/issue_6.confluence similarity index 100% rename from src/test/testfiles/win/issue_6.confluence rename to src/test/suite/fixtures/testfiles/win/issue_6.confluence diff --git a/src/test/testfiles/nix/issues.confluence b/src/test/suite/fixtures/testfiles/win/issues.confluence similarity index 70% rename from src/test/testfiles/nix/issues.confluence rename to src/test/suite/fixtures/testfiles/win/issues.confluence index 5aea630..254947a 100644 --- a/src/test/testfiles/nix/issues.confluence +++ b/src/test/suite/fixtures/testfiles/win/issues.confluence @@ -59,3 +59,30 @@ This is a {{test}} of how things work with {{confluence}} markup. [#18|https://github.com/denco/vscode-confluence-markup/issues/18]: Italic text with dot in the end _Blah blah blah._ + +[#22|https://github.com/denco/vscode-confluence-markup/issues/22] panel support + +{panel} +Some text +{panel} + +{panel:title=My Title} +Some text with a title +{panel} + +{panel:title=My Title|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1|bgColor=#FFFFCE} +a block of text surrounded with a *panel* +yet _another_ line +{panel} + +[#24|https://github.com/denco/vscode-confluence-markup/issues/24]: Can't use [ and ] in string + +[lalala] + +[lalala\] + +[text|https://link] + +[text|https://link\] + +[ text|https://link ] diff --git a/src/test/testfiles/win/scoped/colortext.confluence b/src/test/suite/fixtures/testfiles/win/scoped/colortext.confluence similarity index 100% rename from src/test/testfiles/win/scoped/colortext.confluence rename to src/test/suite/fixtures/testfiles/win/scoped/colortext.confluence diff --git a/src/test/testfiles/win/scoped/headings.confluence b/src/test/suite/fixtures/testfiles/win/scoped/headings.confluence similarity index 100% rename from src/test/testfiles/win/scoped/headings.confluence rename to src/test/suite/fixtures/testfiles/win/scoped/headings.confluence diff --git a/src/test/testfiles/win/scoped/lists.confluence b/src/test/suite/fixtures/testfiles/win/scoped/lists.confluence similarity index 100% rename from src/test/testfiles/win/scoped/lists.confluence rename to src/test/suite/fixtures/testfiles/win/scoped/lists.confluence diff --git a/src/test/testfiles/win/scoped/tables.confluence b/src/test/suite/fixtures/testfiles/win/scoped/tables.confluence similarity index 100% rename from src/test/testfiles/win/scoped/tables.confluence rename to src/test/suite/fixtures/testfiles/win/scoped/tables.confluence diff --git a/src/test/testfiles/nix/test.confluence b/src/test/suite/fixtures/testfiles/win/test.confluence similarity index 92% rename from src/test/testfiles/nix/test.confluence rename to src/test/suite/fixtures/testfiles/win/test.confluence index b816aa4..6c892aa 100644 --- a/src/test/testfiles/nix/test.confluence +++ b/src/test/suite/fixtures/testfiles/win/test.confluence @@ -100,6 +100,7 @@ h2. *code:* {code:language=sh|title=title|borderStyle=solid} bash +echo very long command line with a lot of sings to check word wrap and how it looks like && echo much more elements to print {code} {code}code oneline{code} diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts new file mode 100644 index 0000000..162fe71 --- /dev/null +++ b/src/test/suite/index.ts @@ -0,0 +1,37 @@ +import * as path from 'path'; +import * as Mocha from 'mocha'; +import * as glob from 'glob'; + +export function run(): Promise{ + // Create the mocha test + const mocha = new Mocha({ + ui: 'tdd' + }); + mocha.useColors(true); + + const testsRoot = path.resolve(__dirname, '..'); + + return new Promise((c, e) => { + glob('**/**.test.js', { cwd: testsRoot }, (err, files) => { + if (err) { + return e(err); + } + + // Add files to the test suite + files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); + + try { + // Run the mocha test + mocha.run(failures => { + if (failures > 0) { + e(new Error(`${failures} tests failed.`)); + } else { + c(); + } + }); + } catch (err) { + e(err); + } + }); + }); +} \ No newline at end of file diff --git a/src/test/markupParser.test.ts b/src/test/suite/markupParser.test.ts similarity index 85% rename from src/test/markupParser.test.ts rename to src/test/suite/markupParser.test.ts index d04824f..de615a6 100644 --- a/src/test/markupParser.test.ts +++ b/src/test/suite/markupParser.test.ts @@ -3,13 +3,13 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; import * as path from 'path'; -import { parseMarkup, cssUri } from '../markupParser'; +import { parseMarkup, cssUri } from '../../markupParser'; import * as fs from 'fs'; const HTML_FORMATTER = require('html-formatter'); -const TEST_FILES_ROOT = path.join(__dirname, "../../src/test/testfiles"); -const FIXTURES_ROOT = path.join(__dirname, "../../src/test/resources/fixtures"); +const TEST_FILES_ROOT = path.join(__dirname, "../../../src/test/suite/fixtures/testfiles"); +const FIXTURES_ROOT = path.join(__dirname, "../../../src/test/suite/fixtures/expected"); function walkdirSync(dir: string): string[] { return fs.readdirSync(dir).reduce(function (result: string[], file) { @@ -24,11 +24,12 @@ function isConfluence(element: string, index: number, array: string[]): boolean } // Defines a Mocha test suite to group tests of similar kind together -suite("markupParser Tests", function () { +suite("MarkupParser Tests", function () { // Defines a Mocha unit test test("Test CSS Uri", function () { - const expected = vscode.Uri.file(path.join(__dirname, "../../media/css/dummy.css")); + const expected = vscode.Uri.file(path.join(__dirname, "../../../media/css/dummy.css")); + console.log(expected.fsPath) const css = cssUri("dummy.css"); assert.notEqual(css, undefined); if (css) {