Skip to content

Commit

Permalink
Change the library for YAML encode in topic viewer
Browse files Browse the repository at this point in the history
To support displaying newlines in long strings
  • Loading branch information
okalachev committed Jun 9, 2024
1 parent e1ff92e commit 91bb9d6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 238 deletions.
236 changes: 0 additions & 236 deletions clover/www/js/json-to-pretty-yaml.js

This file was deleted.

2 changes: 1 addition & 1 deletion clover/www/js/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function viewTopic(topic) {
}
}

let txt = `<div class=counter>${counter} received</div>${yamlStringify(msg)}`; // JSON.stringify(msg, null, 4);
let txt = `<div class=counter>${counter} received</div>${YAML.stringify(msg)}`; // JSON.stringify(msg, null, 4);
topicMessage.innerHTML = txt;
});
}
Expand Down
19 changes: 19 additions & 0 deletions clover/www/js/yaml.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clover/www/topics.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<script src="js/roslib.js"></script>
<link rel="icon" href="data:,"> <!-- make chrome don't request icon -->
<script type="module" src="js/topics.js"></script>
<script src="js/json-to-pretty-yaml.js"></script>
<script src="js/yaml.js"></script>
<style>
#topics { line-height: 1.2em; }
#topic-view {
Expand Down

0 comments on commit 91bb9d6

Please sign in to comment.