我在markdown中有一个表格的以下文本,我已经搜索了这个问题,并查看了已经回答的StackOverflow问题: How does one escape backticks in markdown?
我似乎无法找到解决问题的方法,文字不会在markdown中显示为表格。
`Hey ${user_name}!`
我意识到内容有些讽刺,无论我认为它与import React, { Component } from "react";
import "./CSS/App.css";
import Table1 from "./Table1";
import Axios from 'axios';
//import CoinTable from './components/coin-table'
import coinData from './data/coins.json'
//import DBConfig from "./API/DBConfig"; // can't do because you need to have the api
// creates a "template" of the components that will be used
// Header and Content need to be capitalized in order to work
class App extends Component
{
render()
{
return( // left paren has to go there otherwise it'll fail out
<div>
<Header/>
<Content/>
<CoinTable/>
<ActorTable/>
</div>
);
}
}
export class Header extends Component
{
render()
{
return(
<div>
<center><h1>Learning React</h1></center>
</div>
);
}
}
export class Content extends Component {
render()
{
return (
<div>
<h2>Content</h2>
<p>The content text!!</p>
</div>
);
};
};
// coin information table
export class CoinTable extends Component {
render() {
return (
<div className="App">
<p className="Table-header">Coin Information</p>
<Table1 data={coinData}/>
</div>
);
};
};
// Actor information table
export class ActorTable extends Component {
render() {
return (
<div className="App2">
<p className="Table-header">Actor Table</p>
</div>
);
};
};
export default App;
部分有关。
答案 0 :(得分:2)
这与您的反引号无关。只需在文本和表格的开头之间添加一个空白行即可:
This brings us to our next topic under strings, Escaping and Special Characters.
| Code | Description | Example |
|:------:|:-----------------:|:----------------------:|
| \n | Newline | "Hello\nWorld" |
| \r | Return Carriage | "Line1\rLine2" |
| \t | Tab | "Hello\tWorld" |
| \' | Single Quotation | 'Don\\'t clap!' |
| \"" | Double Quotation | "Say, \\"Hello.\\"" |
| \$ | Dollar Sign | `` `Hey ${user_name}!` `` |
| \\\ | Backslash | "5\\5 === 1" |
| \uXXXX | Unicode Point | "Alpha Symbol: \u03B1" |
| \xXX | Latin-1 Character | "Mu Symbol: \xDF" |
| \0 | NUL Character | "ASCII NUL: \o" |
| \v | Vertical Tab | "Vertical Tab: \v" |
| \b | Backspace | "Backspace: \b" |
| \f | Form Feed | "Form Feed: \f" |
如果您不希望将`Hey ${user_name}!`
呈现为内联代码,请尝试使用\`Hey ${user_name}!\`
而不是外部双反引号。
答案 1 :(得分:0)
在StackOverflow上转义反引号的另一种方法是对反引号使用HTML实体之一:val =
2015-07-16T03:28:36.410305
2015-07-16T03:29:00.000000
...
或`
,它们显示单个反引号。
如果您发现Markdown不能正确显示任何字符,则可以改用requirejs,它将跳过Markdown的翻译。