kcc-gem-theme 1.51.32 → 1.51.33

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ import setSheetParameters from './simpleSetSheetParameters.js';
2
2
  import createAlertsHtml from './createAlertsHtml.js';
3
3
 
4
4
  const SHEET_KEY = '1plXBiZY5pVbhNT-mszxEuqCl4zy8wMnz9gXXbbT_yLs';
5
- const SHEET_TAB_NAME = 'Alerts';
5
+ const SHEET_TAB_NAME = 'Alerts Testing';
6
6
  const EMERGENCY_ALERT_DIV_ID = 'emergencyAlerts'
7
7
 
8
8
  function start() {
@@ -32,8 +32,8 @@ function createAnchorElements(string) {
32
32
  return string = string.replace(/\[(?<linkText>[^\]]*)\]\((?<linkHref>[^\)]*)\)/g, '<a href="$<linkHref>" target="_blank" rel="noopener noreferrer">$<linkText></a>');
33
33
  }
34
34
 
35
- function replacer(match, p1, offset, string) {
36
- if ( p1 === '' ) { // Return all the '__' (double underscore) matches, as is.
35
+ function replacer(match, p1) {
36
+ if ( p1 === '' ) { // Filters out the '__' (double underscore) matches.
37
37
  return match;
38
38
  } else {
39
39
  for (var el in INLINE_MARKDOWN_ELEMENTS_OBJECT) {
@@ -54,8 +54,16 @@ function createInlineElements(string) {
54
54
  return string;
55
55
  }
56
56
 
57
+ function paragraphReplacer(match, p1) {
58
+ if ( p1 === '' ) { // Filters out blank lines
59
+ return match;
60
+ } else {
61
+ return match.replace(/^(.*)$/gm, '<p class="typography__alert">$1</p>');
62
+ }
63
+ }
64
+
57
65
  function createParagraphElements(string) {
58
- return string = string.replace(/(?<!$)^(.*)(?<!^)$/gm, '<p class="typography__alert">$1</p>');
66
+ return string = string.replace(/^(.*)$/gm, paragraphReplacer);
59
67
  }
60
68
 
61
69
  function parseMarkdownToHTML(string) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kcc-gem-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.51.32
4
+ version: 1.51.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - wdzajicek