Skip to content

Commit

Permalink
Revert "fix(rosetta): 'extract' does not translate samples in submodu…
Browse files Browse the repository at this point in the history
…le READMEs (#2712)"

This reverts commit ccac1bd.
  • Loading branch information
iliapolo authored Mar 22, 2021
1 parent 6717118 commit 670049f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
12 changes: 0 additions & 12 deletions packages/jsii-rosetta/lib/jsii/assemblies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ export function allSnippetSources(
});
}

for (const [submoduleFqn, submodule] of Object.entries(
assembly.submodules ?? {},
)) {
if (submodule.readme) {
ret.push({
type: 'markdown',
markdown: submodule.readme.markdown,
where: removeSlashes(`${submoduleFqn}-README`),
});
}
}

if (assembly.types) {
Object.values(assembly.types).forEach((type) => {
emitDocs(type.docs, `${assembly.name}.${type.name}`);
Expand Down
27 changes: 0 additions & 27 deletions packages/jsii-rosetta/test/jsii/assemblies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,6 @@ test('Extract snippet from README', () => {
expect(snippets[0].visibleSource).toEqual('someExample();');
});

test('Extract snippet from submodule READMEs', () => {
const snippets = Array.from(
allTypeScriptSnippets([
{
assembly: fakeAssembly({
submodules: {
'my.submodule': {
readme: {
markdown: [
'Before the example.',
'```ts',
'someExample();',
'```',
'After the example.',
].join('\n'),
},
},
},
}),
directory: path.join(__dirname, 'fixtures'),
},
]),
);

expect(snippets[0].visibleSource).toEqual('someExample();');
});

test('Extract snippet from type docstring', () => {
const snippets = Array.from(
allTypeScriptSnippets([
Expand Down

0 comments on commit 670049f

Please sign in to comment.