jupyterlab_github_markdown_alerts_extension 1.0.6 → 1.0.9

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.
package/lib/index.js CHANGED
@@ -113,12 +113,10 @@ function postProcessAlerts(html, showBackgrounds) {
113
113
  const backgroundClass = showBackgrounds
114
114
  ? ' markdown-alert-with-backgrounds'
115
115
  : '';
116
- const alertHtml = `<div class="markdown-alert ${config.className}${backgroundClass}" dir="auto">` +
116
+ return (`<div class="markdown-alert ${config.className}${backgroundClass}" dir="auto">` +
117
117
  `<p class="markdown-alert-title" dir="auto">${icon}${config.title}</p>` +
118
118
  content +
119
- `</div>`;
120
- console.log('Alert HTML generated:', alertHtml);
121
- return alertHtml;
119
+ `</div>`);
122
120
  });
123
121
  return result;
124
122
  }
@@ -155,12 +153,8 @@ const plugin = {
155
153
  const originalRender = markdownParser.render.bind(markdownParser);
156
154
  markdownParser.render = async (content) => {
157
155
  const processedContent = processAlerts(content);
158
- console.log('Processed content:', processedContent);
159
156
  const renderedHtml = await originalRender(processedContent);
160
- console.log('Rendered HTML:', renderedHtml);
161
- const finalHtml = postProcessAlerts(renderedHtml, showBackgrounds);
162
- console.log('Final HTML:', finalHtml);
163
- return finalHtml;
157
+ return postProcessAlerts(renderedHtml, showBackgrounds);
164
158
  };
165
159
  console.log('JupyterLab extension jupyterlab_github_markdown_alerts_extension is activated!');
166
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_github_markdown_alerts_extension",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "Jupyterlab extension to render alerts tips like they are rendered in github in markdown",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/index.ts CHANGED
@@ -172,14 +172,12 @@ function postProcessAlerts(html: string, showBackgrounds: boolean): string {
172
172
  ? ' markdown-alert-with-backgrounds'
173
173
  : '';
174
174
 
175
- const alertHtml =
175
+ return (
176
176
  `<div class="markdown-alert ${config.className}${backgroundClass}" dir="auto">` +
177
177
  `<p class="markdown-alert-title" dir="auto">${icon}${config.title}</p>` +
178
178
  content +
179
- `</div>`;
180
-
181
- console.log('Alert HTML generated:', alertHtml);
182
- return alertHtml;
179
+ `</div>`
180
+ );
183
181
  }
184
182
  );
185
183
  return result;
@@ -229,12 +227,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
229
227
 
230
228
  markdownParser.render = async (content: string): Promise<string> => {
231
229
  const processedContent = processAlerts(content);
232
- console.log('Processed content:', processedContent);
233
230
  const renderedHtml = await originalRender(processedContent);
234
- console.log('Rendered HTML:', renderedHtml);
235
- const finalHtml = postProcessAlerts(renderedHtml, showBackgrounds);
236
- console.log('Final HTML:', finalHtml);
237
- return finalHtml;
231
+ return postProcessAlerts(renderedHtml, showBackgrounds);
238
232
  };
239
233
 
240
234
  console.log(