diff --git a/cli/cli.ts b/cli/cli.ts index 6d675b09fec6..0dcc084488d6 100644 --- a/cli/cli.ts +++ b/cli/cli.ts @@ -1860,7 +1860,7 @@ function saveThemeJson(cfg: pxt.TargetBundle, localDir?: boolean, packaged?: boo targetStrings[k] = k; const galleryUrl = getGalleryUrl(targetConfig.galleries[k]) const gallerymd = nodeutil.resolveMd(docsRoot, galleryUrl); - const gallery = pxt.gallery.parseGalleryMardown(gallerymd); + const gallery = pxt.gallery.parseGalleryMarkdown(gallerymd); const gurl = `/${galleryUrl.replace(/^\//, '')}`; tocmd += `* [${k}](${gurl}) @@ -3584,7 +3584,7 @@ export function downloadDiscourseTagAsync(parsed: commandParser.ParsedCommand): let lastCard: pxt.CodeCard = undefined; // parse existing cards if (md) { - cards = pxt.gallery.parseGalleryMardown(md); + cards = pxt.gallery.parseGalleryMarkdown(md); lastCard = cards.pop(); } return pxt.discourse.topicsByTag(discourseRoot, tag) @@ -5926,7 +5926,7 @@ function internalCheckDocsAsync(compileSnippets?: boolean, re?: string, fix?: bo broken++; return; } - let gallery = pxt.gallery.parseGalleryMardown(gallerymd); + let gallery = pxt.gallery.parseGalleryMarkdown(gallerymd); pxt.debug(`found ${gallery.length} galleries`); gallery.forEach(gal => gal.cards.forEach((card, cardIndex) => { pxt.debug(`card ${card.shortName || card.name}`); diff --git a/docs/translate/markdown.md b/docs/translate/markdown.md index 7aee40da0e89..98c06acbdf4e 100644 --- a/docs/translate/markdown.md +++ b/docs/translate/markdown.md @@ -28,7 +28,7 @@ Code highlights help to ephasize text that represents a block in the editor Tool <0>||basic:show number|| ``` -The `<0>` and `<0/>` are mardown escape codes and you leave them as is, at the same place in the string. The `||` are delimiters for this highlight extension and those are left alone too. The portion of it to the left of the `:`, which is `basic`, is the blocks category and it stays untranslated. The rest of it, `show number` relates to the block text and it does get translated. Typically, this will translate to the same text as the blocks in the `jsdoc` files. +The `<0>` and `<0/>` are markdown escape codes and you leave them as is, at the same place in the string. The `||` are delimiters for this highlight extension and those are left alone too. The portion of it to the left of the `:`, which is `basic`, is the blocks category and it stays untranslated. The rest of it, `show number` relates to the block text and it does get translated. Typically, this will translate to the same text as the blocks in the `jsdoc` files. ### Avatar sections diff --git a/pxtlib/gallery.ts b/pxtlib/gallery.ts index d09df0405a26..8aa64faeafa0 100644 --- a/pxtlib/gallery.ts +++ b/pxtlib/gallery.ts @@ -193,7 +193,7 @@ namespace pxt.gallery { return !!cards?.length && cards; } - export function parseGalleryMardown(md: string): Gallery[] { + export function parseGalleryMarkdown(md: string): Gallery[] { if (!md) return []; // second level titles are categories @@ -242,7 +242,7 @@ namespace pxt.gallery { export function loadGalleryAsync(name: string): Promise { return pxt.Cloud.markdownAsync(name) - .then(md => parseGalleryMardown(md)) + .then(md => parseGalleryMarkdown(md)) } export function codeCardsToMarkdown(cards: pxt.CodeCard[]) {