我们有以下React代码
return <div>
<div>linesStart is: {linesStart}</div>
<pre id={id} className="line-numbers" data-start={linesStart}>
<code className={`language-${language}`}>
{children}
</code>
</pre>
</div>;
{linesStart}
的计算正确-我们在第一格中进行了验证。{linesStart}
传递给data-start
的Prism 行号插件。例如,即使我们有data-start={5}
,
行号也将从“ 1”开始,而不是从“ 5” 开始。
有什么想法吗?
Dockerfile的内容为:
FROM microsoft/dotnet:sdk AS build-env
WORKDIR /app
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get update \
&& apt-get install -y nodejs
COPY . ./
RUN dotnet restore \
&& cd DemoServer \
&& dotnet publish -c Debug -o out
FROM microsoft/dotnet:aspnetcore-runtime
ENV RAVENDEMO_Database__Urls__0="http://live-test.ravendb.net" RAVENDEMO_Database__Name="Demo" RAVENDEMO_ConferenceMode=false COMPOSE_CONVERT_WINDOWS_PATHS=1
EXPOSE 80
WORKDIR /app
COPY --from=build-env /app/DemoServer/out .
ENTRYPOINT ["dotnet", "DemoServer.dll"]
在控制台(Windows和Linux)中运行以下命令也会产生此问题:
dotnet publish -c Release -o out
cd ./out
dotnet DemoServer.dll