You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first line of the codeblock variable is already filled with rendered elements e.g. for the filename. Inserting the diff operator later into this first line will fail and produce bad HTML, see example below, the <span> for diff-operator + before the <span> for the filename:
<sectionaria-labelledby="toc_the-router-service"><p>To fix our problem, we would need to do the same. Ember exposes this internal state through the <em><ahref="[https://api.emberjs.com/ember/release/classes/RouterService](view-source:https://api.emberjs.com/ember/release/classes/RouterService)">router service</a></em>, which we can <em><ahref="[../../../services/#toc_accessing-services](view-source:https://guides.emberjs.com/release/services/#toc_accessing-services)">inject</a></em> into our component:</p><spanclass="diff-insertion"><spanclass="diff-operator">+</span><divclass="filename js"><divclass="ribbon"></div><span>app/components/share-button.js</span><preclass="language-js line-numbers"><codeclass="js language-js"><spanclass="token keyword">import</span><spanclass="token punctuation">{</span> service <spanclass="token punctuation">}</span><spanclass="token keyword">from</span><spanclass="token string">'@ember/service'</span><spanclass="token punctuation">;</span></span><spanclass="token keyword">import</span> Component <spanclass="token keyword">from</span><spanclass="token string">'@glimmer/component'</span><spanclass="token punctuation">;</span>
The text was updated successfully, but these errors were encountered:
Regarding this bug: ember-learn/guides-source#1956
I traced this problem to this line: https://github.com/empress/ember-showdown-prism/blob/main/addon/initializers/showdown-extension.js#L89
The first line of the
codeblock
variable is already filled with rendered elements e.g. for the filename. Inserting the diff operator later into this first line will fail and produce bad HTML, see example below, the<span>
for diff-operator+
before the<span>
for the filename:URL: https://guides.emberjs.com/release/tutorial/part-2/service-injection/#toc_the-router-service
The text was updated successfully, but these errors were encountered: