Skip to content

Commit c4410d3

Browse files
committed
Revert "chore(docs): add support for language specific notes (#5810)"
This bubbled up in Python comments.
1 parent 516f13e commit c4410d3

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

utils/doclint/documentation.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ Documentation.Class = class {
207207
member.filterForLanguage(lang);
208208
membersArray.push(member);
209209
}
210-
this.spec = filterSpecs(this.spec, lang);
211210
this.membersArray = membersArray;
212211
}
213212

@@ -341,7 +340,6 @@ Documentation.Member = class {
341340
argsArray.push(overriddenArg);
342341
}
343342
this.argsArray = argsArray;
344-
this.spec = filterSpecs(this.spec, lang);
345343
}
346344

347345
clone() {
@@ -689,16 +687,4 @@ function generateSourceCodeComment(spec) {
689687
return md.render(comments, 120);
690688
}
691689

692-
/**
693-
*
694-
* @param {MarkdownNode[]} spec
695-
* @param {string} lang
696-
* @returns {MarkdownNode[]}
697-
*/
698-
function filterSpecs(spec, lang) {
699-
if(!spec)
700-
return;
701-
return spec.filter(n => n.type !== 'note' || (n.type === 'note' && (!n.codeLang || n.codeLang === lang)));
702-
}
703-
704690
module.exports = Documentation;

utils/markdown.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ function buildTree(lines) {
141141
}
142142

143143
if (content.startsWith(':::')) {
144-
let noteType = content.substring(3).split(' ');
145144
/** @type {MarkdownNode} */
146145
const node = {
147146
type: 'note',
148-
noteType: noteType[0],
149-
codeLang: noteType[1]
147+
noteType: content.substring(3)
150148
};
151149
line = lines[++i];
152150
const tokens = [];

0 commit comments

Comments
 (0)