Clipper: Fixes #573: Better handling of certain code blocks

pull/579/merge
Laurent Cozic 2018-06-09 20:00:26 +01:00
parent b826e2d97b
commit 1127eb6e09
9 changed files with 1651 additions and 1695 deletions

View File

@ -36,7 +36,7 @@ describe('HtmlToMd', function() {
const htmlPath = basePath + '/' + htmlFilename;
const mdPath = basePath + '/' + filename(htmlFilename) + '.md';
// if (htmlFilename !== 'table_with_colspan.html') continue;
// if (htmlFilename !== 'code_1.html') continue;
const html = await shim.fsDriver().readFile(htmlPath);
const expectedMd = await shim.fsDriver().readFile(mdPath);

View File

@ -0,0 +1,8 @@
<div>
<table><tbody><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> ma_fonction<span style="color: black;">(</span><span style="color: black;">)</span>:
<span style="color: #483d8b;">"""
C'est une super fonction
"""</span>
<span style="color: #ff7700;font-weight:bold;">pass</span></pre></td></tr></tbody></table>
</div>

View File

@ -0,0 +1,5 @@
def ma_fonction():
"""
C'est une super fonction
"""
pass

View File

@ -56,8 +56,8 @@ SyncTargetRegistry.addClass(SyncTargetOneDrive);
SyncTargetRegistry.addClass(SyncTargetNextcloud);
SyncTargetRegistry.addClass(SyncTargetDropbox);
const syncTargetId_ = SyncTargetRegistry.nameToId("nextcloud");
// const syncTargetId_ = SyncTargetRegistry.nameToId("memory");
// const syncTargetId_ = SyncTargetRegistry.nameToId("nextcloud");
const syncTargetId_ = SyncTargetRegistry.nameToId("memory");
//const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
// const syncTargetId_ = SyncTargetRegistry.nameToId('dropbox');
const syncDir = __dirname + '/../tests/sync';

View File

@ -37,7 +37,11 @@ class Bridge {
this.browser_.runtime.onMessage.addListener(this.browser_notify);
const backgroundPage = this.browser_.extension.getBackgroundPage();
this.env_ = backgroundPage.joplinEnv();
// Not sure why the getBackgroundPage() sometimes returns null, so
// in that case default to "prod" environment, which means the live
// extension won't be affected by this bug.
this.env_ = backgroundPage ? backgroundPage.joplinEnv() : 'prod';
console.info('Popup: Env:', this.env());

File diff suppressed because it is too large Load Diff

View File

@ -62,12 +62,12 @@
},
"homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": {
"ajv": "^6.2.0",
"app-builder-bin": "^1.5.0",
"ajv": "^6.5.0",
"app-builder-bin": "^1.9.11",
"babel-cli": "^6.26.0",
"babel-preset-react": "^6.24.1",
"electron": "^1.7.11",
"electron-builder": "^20.10.0"
"electron": "^1.8.7",
"electron-builder": "^20.15.1"
},
"optionalDependencies": {
"7zip-bin-mac": "^1.0.1",
@ -78,39 +78,39 @@
"app-module-path": "^2.2.0",
"async-mutex": "^0.1.3",
"base-64": "^0.1.0",
"compare-versions": "^3.1.0",
"compare-versions": "^3.2.1",
"electron-context-menu": "^0.9.1",
"electron-is-dev": "^0.3.0",
"electron-window-state": "^4.1.1",
"es6-promise-pool": "^2.5.0",
"follow-redirects": "^1.2.5",
"form-data": "^2.3.1",
"follow-redirects": "^1.5.0",
"form-data": "^2.3.2",
"fs-extra": "^5.0.0",
"highlight.js": "^9.12.0",
"html-entities": "^1.2.1",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.5",
"joplin-turndown-plugin-gfm": "^1.0.6",
"joplin-turndown": "^4.0.7",
"joplin-turndown-plugin-gfm": "^1.0.7",
"jssha": "^2.3.1",
"katex": "^0.9.0-beta1",
"katex": "^0.9.0",
"levenshtein": "^1.0.5",
"lodash": "^4.17.4",
"lodash": "^4.17.10",
"mark.js": "^8.11.1",
"markdown-it": "^8.4.0",
"markdown-it": "^8.4.1",
"markdown-it-katex": "^2.0.3",
"md5": "^2.2.1",
"mermaid": "^8.0.0-rc.8",
"mime": "^2.0.3",
"moment": "^2.19.1",
"mime": "^2.3.1",
"moment": "^2.22.2",
"node-fetch": "^1.7.3",
"node-notifier": "^5.1.2",
"node-notifier": "^5.2.1",
"promise": "^8.0.1",
"query-string": "^5.0.1",
"react": "^16.0.0",
"react-ace": "^5.5.0",
"react-datetime": "^2.11.0",
"react-dom": "^16.0.0",
"react-redux": "^5.0.6",
"query-string": "^5.1.1",
"react": "^16.4.0",
"react-ace": "^5.10.0",
"react-datetime": "^2.14.0",
"react-dom": "^16.4.0",
"react-redux": "^5.0.7",
"read-chunk": "^2.1.0",
"readability-node": "^0.1.0",
"redux": "^3.7.2",
@ -119,11 +119,11 @@
"sprintf-js": "^1.1.1",
"sqlite3": "^3.1.13",
"string-padding": "^1.0.2",
"string-to-stream": "^1.1.0",
"tar": "^4.4.0",
"string-to-stream": "^1.1.1",
"tar": "^4.4.4",
"tcp-port-used": "^0.1.2",
"url-parse": "^1.2.0",
"uuid": "^3.1.0",
"url-parse": "^1.4.1",
"uuid": "^3.2.1",
"valid-url": "^1.0.9",
"xml2js": "^0.4.19"
}

View File

@ -105,7 +105,7 @@ class AlarmService {
}
static async updateAllNotifications() {
this.logger().info('Updading all notifications...');
this.logger().info('Updating all notifications...');
await this.garbageCollect();

View File

@ -4,5 +4,8 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$ROOT_DIR/CliClient/node_modules"
rm -rf tkwidgets joplin-turndown joplin-turndown-plugin-gfm
ln -s /mnt/d/Docs/PROGS/Node/tkwidgets/src tkwidgets
ln -s /mnt/d/Temp/turndown-plugin-gfm joplin-turndown-plugin-gfm
ln -s /mnt/d/Temp/turndown joplin-turndown
ln -s /mnt/d/Docs/PROGS/Node/joplin-turndown-plugin-gfm joplin-turndown-plugin-gfm
ln -s /mnt/d/Docs/PROGS/Node/joplin-turndown joplin-turndown
rsync -a --delete --exclude 'node_modules/' /mnt/d/Docs/PROGS/Node/joplin-turndown-plugin-gfm/ /var/www/joplin/ElectronClient/app/node_modules/joplin-turndown-plugin-gfm/
rsync -a --delete --exclude 'node_modules/' /mnt/d/Docs/PROGS/Node/joplin-turndown/ /var/www/joplin/ElectronClient/app/node_modules/joplin-turndown/