@md-plugins/quasar-app-extension-q-press 0.1.0-beta.15 → 0.1.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,9 +62,31 @@ function rewriteRootRelativeUrls(content: string) {
62
62
 
63
63
  function indent(code: string, spaces = 2) {
64
64
  const padding = ' '.repeat(spaces)
65
+ let isInsideTemplateLiteral = false
66
+
65
67
  return code
66
68
  .split('\n')
67
- .map((line) => (line.trim().length > 0 ? padding + line : line))
69
+ .map((line) => {
70
+ const shouldIndent = line.trim().length > 0 && isInsideTemplateLiteral === false
71
+
72
+ for (let index = 0; index < line.length; index++) {
73
+ if (line[index] !== '`') {
74
+ continue
75
+ }
76
+
77
+ let escapeCount = 0
78
+
79
+ for (let escapeIndex = index - 1; escapeIndex >= 0 && line[escapeIndex] === '\\'; escapeIndex--) {
80
+ escapeCount++
81
+ }
82
+
83
+ if (escapeCount % 2 === 0) {
84
+ isInsideTemplateLiteral = !isInsideTemplateLiteral
85
+ }
86
+ }
87
+
88
+ return shouldIndent ? padding + line : line
89
+ })
68
90
  .join('\n')
69
91
  }
70
92
 
@@ -177,7 +199,7 @@ function getSetupReturnNames(content: string) {
177
199
  const declarationRe =
178
200
  /(?:^|\n)\s*(?:const|let|var)\s+([\s\S]*?)(?=\n\s*(?:const|let|var|function|interface|type|class)\s+|\s*$)/g
179
201
  const variableNameRe = /(?:^|\n)\s*([A-Za-z_$][\w$]*)\s*(?:[:=,]|$)/g
180
- const functionRe = /(?:^|\n)\s*function\s+([A-Za-z_$][\w$]*)/g
202
+ const functionRe = /(?:^|\n)\s*(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/g
181
203
  let match: RegExpExecArray | null
182
204
 
183
205
  while ((match = declarationRe.exec(topLevelContent)) !== null) {
@@ -306,7 +306,7 @@ const hasMoreLinks = computed(() => siteConfig.links.moreLinks.length > 0)
306
306
  }
307
307
 
308
308
  &__links {
309
- justify-content: end;
309
+ justify-content: flex-end;
310
310
 
311
311
  @media (min-width: 1921px) {
312
312
  justify-content: center;
@@ -101,7 +101,7 @@ const pageContentClass = computed(
101
101
  }
102
102
 
103
103
  @media (max-width: 1845px) {
104
- justify-content: start;
104
+ justify-content: flex-start;
105
105
 
106
106
  .markdown-page__toc-container--flowing {
107
107
  display: none;
@@ -25,6 +25,16 @@
25
25
  Get Started
26
26
  </span>
27
27
  </router-link>
28
+ <router-link
29
+ to="/guides/upgrade-guide"
30
+ class="hero-button q-btn q-btn-item non-selectable no-outline q-btn--standard q-btn--rectangle q-btn--actionable q-focusable q-hoverable q-btn--no-uppercase q-btn--rounded q-btn--dense"
31
+ >
32
+ <span
33
+ class="q-btn__content text-center col items-center q-anchor--skip justify-center row"
34
+ >
35
+ Upgrade Guide
36
+ </span>
37
+ </router-link>
28
38
  <a
29
39
  href="https://github.com/md-plugins/md-plugins"
30
40
  target="_blank"
@@ -62,9 +62,31 @@ function rewriteRootRelativeUrls(content: string) {
62
62
 
63
63
  function indent(code: string, spaces = 2) {
64
64
  const padding = ' '.repeat(spaces)
65
+ let isInsideTemplateLiteral = false
66
+
65
67
  return code
66
68
  .split('\n')
67
- .map((line) => (line.trim().length > 0 ? padding + line : line))
69
+ .map((line) => {
70
+ const shouldIndent = line.trim().length > 0 && isInsideTemplateLiteral === false
71
+
72
+ for (let index = 0; index < line.length; index++) {
73
+ if (line[index] !== '`') {
74
+ continue
75
+ }
76
+
77
+ let escapeCount = 0
78
+
79
+ for (let escapeIndex = index - 1; escapeIndex >= 0 && line[escapeIndex] === '\\'; escapeIndex--) {
80
+ escapeCount++
81
+ }
82
+
83
+ if (escapeCount % 2 === 0) {
84
+ isInsideTemplateLiteral = !isInsideTemplateLiteral
85
+ }
86
+ }
87
+
88
+ return shouldIndent ? padding + line : line
89
+ })
68
90
  .join('\n')
69
91
  }
70
92
 
@@ -177,7 +199,7 @@ function getSetupReturnNames(content: string) {
177
199
  const declarationRe =
178
200
  /(?:^|\n)\s*(?:const|let|var)\s+([\s\S]*?)(?=\n\s*(?:const|let|var|function|interface|type|class)\s+|\s*$)/g
179
201
  const variableNameRe = /(?:^|\n)\s*([A-Za-z_$][\w$]*)\s*(?:[:=,]|$)/g
180
- const functionRe = /(?:^|\n)\s*function\s+([A-Za-z_$][\w$]*)/g
202
+ const functionRe = /(?:^|\n)\s*(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/g
181
203
  let match: RegExpExecArray | null
182
204
 
183
205
  while ((match = declarationRe.exec(topLevelContent)) !== null) {
@@ -306,7 +306,7 @@ const hasMoreLinks = computed(() => siteConfig.links.moreLinks.length > 0)
306
306
  }
307
307
 
308
308
  &__links {
309
- justify-content: end;
309
+ justify-content: flex-end;
310
310
 
311
311
  @media (min-width: 1921px) {
312
312
  justify-content: center;
@@ -101,7 +101,7 @@ const pageContentClass = computed(
101
101
  }
102
102
 
103
103
  @media (max-width: 1845px) {
104
- justify-content: start;
104
+ justify-content: flex-start;
105
105
 
106
106
  .markdown-page__toc-container--flowing {
107
107
  display: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/quasar-app-extension-q-press",
3
- "version": "0.1.0-beta.15",
3
+ "version": "0.1.0-beta.17",
4
4
  "description": "QPress - The Ultimate Markdown Solution for Quasar Framework",
5
5
  "keywords": [
6
6
  "markdown",
@@ -30,18 +30,18 @@
30
30
  "@types/markdown-it": "^14.1.2",
31
31
  "fs-extra": "^11.3.5",
32
32
  "markdown-it": "^14.2.0",
33
- "@md-plugins/md-plugin-frontmatter": "0.1.0-beta.15",
34
- "@md-plugins/md-plugin-blockquote": "0.1.0-beta.15",
35
- "@md-plugins/md-plugin-containers": "0.1.0-beta.15",
36
- "@md-plugins/md-plugin-image": "0.1.0-beta.15",
37
- "@md-plugins/md-plugin-imports": "0.1.0-beta.15",
38
- "@md-plugins/md-plugin-headers": "0.1.0-beta.15",
39
- "@md-plugins/md-plugin-inlinecode": "0.1.0-beta.15",
40
- "@md-plugins/md-plugin-link": "0.1.0-beta.15",
41
- "@md-plugins/md-plugin-codeblocks": "0.1.0-beta.15",
42
- "@md-plugins/md-plugin-title": "0.1.0-beta.15",
43
- "@md-plugins/vite-md-plugin": "0.1.0-beta.15",
44
- "@md-plugins/md-plugin-table": "0.1.0-beta.15"
33
+ "@md-plugins/md-plugin-codeblocks": "0.1.0-beta.17",
34
+ "@md-plugins/md-plugin-blockquote": "0.1.0-beta.17",
35
+ "@md-plugins/md-plugin-containers": "0.1.0-beta.17",
36
+ "@md-plugins/md-plugin-frontmatter": "0.1.0-beta.17",
37
+ "@md-plugins/md-plugin-imports": "0.1.0-beta.17",
38
+ "@md-plugins/md-plugin-image": "0.1.0-beta.17",
39
+ "@md-plugins/md-plugin-headers": "0.1.0-beta.17",
40
+ "@md-plugins/md-plugin-inlinecode": "0.1.0-beta.17",
41
+ "@md-plugins/md-plugin-link": "0.1.0-beta.17",
42
+ "@md-plugins/md-plugin-table": "0.1.0-beta.17",
43
+ "@md-plugins/vite-md-plugin": "0.1.0-beta.17",
44
+ "@md-plugins/md-plugin-title": "0.1.0-beta.17"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@quasar/app-vite": "3.0.0-beta.32",
@@ -62,9 +62,31 @@ function rewriteRootRelativeUrls(content: string) {
62
62
 
63
63
  function indent(code: string, spaces = 2) {
64
64
  const padding = ' '.repeat(spaces)
65
+ let isInsideTemplateLiteral = false
66
+
65
67
  return code
66
68
  .split('\n')
67
- .map((line) => (line.trim().length > 0 ? padding + line : line))
69
+ .map((line) => {
70
+ const shouldIndent = line.trim().length > 0 && isInsideTemplateLiteral === false
71
+
72
+ for (let index = 0; index < line.length; index++) {
73
+ if (line[index] !== '`') {
74
+ continue
75
+ }
76
+
77
+ let escapeCount = 0
78
+
79
+ for (let escapeIndex = index - 1; escapeIndex >= 0 && line[escapeIndex] === '\\'; escapeIndex--) {
80
+ escapeCount++
81
+ }
82
+
83
+ if (escapeCount % 2 === 0) {
84
+ isInsideTemplateLiteral = !isInsideTemplateLiteral
85
+ }
86
+ }
87
+
88
+ return shouldIndent ? padding + line : line
89
+ })
68
90
  .join('\n')
69
91
  }
70
92
 
@@ -177,7 +199,7 @@ function getSetupReturnNames(content: string) {
177
199
  const declarationRe =
178
200
  /(?:^|\n)\s*(?:const|let|var)\s+([\s\S]*?)(?=\n\s*(?:const|let|var|function|interface|type|class)\s+|\s*$)/g
179
201
  const variableNameRe = /(?:^|\n)\s*([A-Za-z_$][\w$]*)\s*(?:[:=,]|$)/g
180
- const functionRe = /(?:^|\n)\s*function\s+([A-Za-z_$][\w$]*)/g
202
+ const functionRe = /(?:^|\n)\s*(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/g
181
203
  let match: RegExpExecArray | null
182
204
 
183
205
  while ((match = declarationRe.exec(topLevelContent)) !== null) {
@@ -306,7 +306,7 @@ const hasMoreLinks = computed(() => siteConfig.links.moreLinks.length > 0)
306
306
  }
307
307
 
308
308
  &__links {
309
- justify-content: end;
309
+ justify-content: flex-end;
310
310
 
311
311
  @media (min-width: 1921px) {
312
312
  justify-content: center;
@@ -101,7 +101,7 @@ const pageContentClass = computed(
101
101
  }
102
102
 
103
103
  @media (max-width: 1845px) {
104
- justify-content: start;
104
+ justify-content: flex-start;
105
105
 
106
106
  .markdown-page__toc-container--flowing {
107
107
  display: none;
@@ -25,6 +25,16 @@
25
25
  Get Started
26
26
  </span>
27
27
  </router-link>
28
+ <router-link
29
+ to="/guides/upgrade-guide"
30
+ class="hero-button q-btn q-btn-item non-selectable no-outline q-btn--standard q-btn--rectangle q-btn--actionable q-focusable q-hoverable q-btn--no-uppercase q-btn--rounded q-btn--dense"
31
+ >
32
+ <span
33
+ class="q-btn__content text-center col items-center q-anchor--skip justify-center row"
34
+ >
35
+ Upgrade Guide
36
+ </span>
37
+ </router-link>
28
38
  <a
29
39
  href="https://github.com/md-plugins/md-plugins"
30
40
  target="_blank"
@@ -62,9 +62,31 @@ function rewriteRootRelativeUrls(content: string) {
62
62
 
63
63
  function indent(code: string, spaces = 2) {
64
64
  const padding = ' '.repeat(spaces)
65
+ let isInsideTemplateLiteral = false
66
+
65
67
  return code
66
68
  .split('\n')
67
- .map((line) => (line.trim().length > 0 ? padding + line : line))
69
+ .map((line) => {
70
+ const shouldIndent = line.trim().length > 0 && isInsideTemplateLiteral === false
71
+
72
+ for (let index = 0; index < line.length; index++) {
73
+ if (line[index] !== '`') {
74
+ continue
75
+ }
76
+
77
+ let escapeCount = 0
78
+
79
+ for (let escapeIndex = index - 1; escapeIndex >= 0 && line[escapeIndex] === '\\'; escapeIndex--) {
80
+ escapeCount++
81
+ }
82
+
83
+ if (escapeCount % 2 === 0) {
84
+ isInsideTemplateLiteral = !isInsideTemplateLiteral
85
+ }
86
+ }
87
+
88
+ return shouldIndent ? padding + line : line
89
+ })
68
90
  .join('\n')
69
91
  }
70
92
 
@@ -177,7 +199,7 @@ function getSetupReturnNames(content: string) {
177
199
  const declarationRe =
178
200
  /(?:^|\n)\s*(?:const|let|var)\s+([\s\S]*?)(?=\n\s*(?:const|let|var|function|interface|type|class)\s+|\s*$)/g
179
201
  const variableNameRe = /(?:^|\n)\s*([A-Za-z_$][\w$]*)\s*(?:[:=,]|$)/g
180
- const functionRe = /(?:^|\n)\s*function\s+([A-Za-z_$][\w$]*)/g
202
+ const functionRe = /(?:^|\n)\s*(?:async\s+)?function\s+([A-Za-z_$][\w$]*)/g
181
203
  let match: RegExpExecArray | null
182
204
 
183
205
  while ((match = declarationRe.exec(topLevelContent)) !== null) {
@@ -306,7 +306,7 @@ const hasMoreLinks = computed(() => siteConfig.links.moreLinks.length > 0)
306
306
  }
307
307
 
308
308
  &__links {
309
- justify-content: end;
309
+ justify-content: flex-end;
310
310
 
311
311
  @media (min-width: 1921px) {
312
312
  justify-content: center;
@@ -101,7 +101,7 @@ const pageContentClass = computed(
101
101
  }
102
102
 
103
103
  @media (max-width: 1845px) {
104
- justify-content: start;
104
+ justify-content: flex-start;
105
105
 
106
106
  .markdown-page__toc-container--flowing {
107
107
  display: none;