curriculum/challenges/english/blocks/daily-coding-challenges-javascript/694596b0585c11170ac7c7fc.md
Given a string of Markdown that includes one or more inline code blocks, return the equivalent HTML string.
Inline code blocks in Markdown use a single backtick (`) at the start and end of the code block text.
Return the given string with all code blocks converted to HTML code tags.
For example, given the string "Use `let` to declare the variable.", return "Use <code>let</code> to declare the variable.".
Note: The console may not display HTML tags in strings when logging messages. Check the browser console to see logs with tags included.
parseInlineCode("Use `let` to declare the variable.") should return "Use <code>let</code> to declare the variable.".
assert.equal(parseInlineCode("Use `let` to declare the variable."), "Use <code>let</code> to declare the variable.");
parseInlineCode("Use `let` or `const` to declare a variable.") should return "Use <code>let</code> or <code>const</code> to declare a variable.".
assert.equal(parseInlineCode("Use `let` or `const` to declare a variable."), "Use <code>let</code> or <code>const</code> to declare a variable.");
parseInlineCode("Run `npm install` then `npm start`.") should return "Run <code>npm install</code> then <code>npm start</code>.".
assert.equal(parseInlineCode("Run `npm install` then `npm start`."), "Run <code>npm install</code> then <code>npm start</code>.");
function parseInlineCode(markdown) {
return markdown;
}
function parseInlineCode(markdown) {
return markdown.replace(/`([^`]+)`/g, "<code>$1</code>");
}