Skip to content

Commit

Permalink
remove multilanguage option
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsharE committed Jan 22, 2025
1 parent 6ff02f4 commit 7ac2643
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ const stack = new netStack('.stacktrace', {
prettyprint: true
});
```
##### multilanguage: boolean
Default: false.
Find multiple languages and render them accordingly.
```javascript
const stack = new netStack('.stacktrace', {
multilanguage: true
});
```

#### Ready to go CSS
```css
Expand Down
31 changes: 16 additions & 15 deletions netstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// Default values for classes
this.settings = extend({
prettyprint: false,
multilanguage: false,
frame: 'st-frame',
type: 'st-type',
method: 'st-method',
Expand Down Expand Up @@ -158,20 +157,22 @@
};

// look for the language(s) in the stack trace
if (this.settings.multilanguage) {
lang = this.detectLanguagesInOrder(lines, languagesRegex);
} else {
for (var i = 0; i < lines.length; ++i) {
if (lang === '') {
for (var key in languagesRegex) {
if (languagesRegex[key].test(lines[i])) {
lang = key;
break;
}
}
}
}
}
lang = this.detectLanguagesInOrder(lines, languagesRegex);

// if (this.settings.multilanguage) {
// lang = this.detectLanguagesInOrder(lines, languagesRegex);
// } else {
// for (var i = 0; i < lines.length; ++i) {
// if (lang === '') {
// for (var key in languagesRegex) {
// if (languagesRegex[key].test(lines[i])) {
// lang = key;
// break;
// }
// }
// }
// }
// }

if (lang === '') return;

Expand Down

0 comments on commit 7ac2643

Please sign in to comment.