Skip to content

Commit

Permalink
don't load module if running in safari (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Jun 23, 2021
1 parent 77118a3 commit e5b7c60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ require('codemirror-asciidoc');
const registry = asciidoctor().Extensions.create();
highlightJsExt.register(registry);
if (navigator.userAgent.toLowerCase().indexOf('safari') === -1 || navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
const kroki = require('../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki');
kroki.register(registry);
import(/* webpackChunkName: "kroki" */ '../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki')
.then((value) => value.register(registry));
}
const asciidoctorOptions = {
Expand Down
4 changes: 2 additions & 2 deletions src/scratch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ require('codemirror-asciidoc');
const registry = asciidoctor().Extensions.create();
highlightJsExt.register(registry);
if (navigator.userAgent.toLowerCase().indexOf('safari') === -1 || navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
const kroki = require('../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki');
kroki.register(registry);
import(/* webpackChunkName: "kroki" */ '../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki')
.then((value) => value.register(registry));
}
const asciidoctorOptions = {
Expand Down
4 changes: 2 additions & 2 deletions src/start.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ import axios from 'axios';
const registry = asciidoctor().Extensions.create();
if (navigator.userAgent.toLowerCase().indexOf('safari') === -1 || navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
const kroki = require('../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki');
kroki.register(registry);
import(/* webpackChunkName: "kroki" */ '../node_modules/asciidoctor-kroki/dist/browser/asciidoctor-kroki')
.then((value) => value.register(registry));
}
const options = {
Expand Down

0 comments on commit e5b7c60

Please sign in to comment.