PasunuriSrinidhi commented on code in PR #995:
URL: https://github.com/apache/camel-website/pull/995#discussion_r1174318990


##########
rules.js:
##########
@@ -56,21 +59,12 @@ class StructuredData extends Rule {
     };
   }
 
-  setup() {
-    let start = -1;
-
-    this.on('tag:open', event => {
-      if (event.target.nodeName === 'script') {
-        start = event.target.location.offset;
-      }
-    });
-
-    this.on('tag:close', async event => {
-      const tag = event.previous;
-      if (event.target.nodeName === 'script' && tag.hasAttribute('type') && 
tag.getAttribute('type').value === 'application/ld+json') {
-        const startIdx = data.indexOf('>', start) + 1;
-        const endIdx = event.target.location.offset - 1; // omit the opening 
tag angled bracket
-        const content = data.substring(startIdx, endIdx);
+  
+setup() {
+    this.on('tag:close', event => {
+      const tag = event.target;

Review Comment:
   Thank you so much for finding the errors. I will look into it. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to