Closed MasGaNo closed 1 year ago
Another example:
Medium.com:
Ghost.io:
Medium.com HTML:
<p name="4722" id="4722" class="graf graf--p graf-after--h3">
Well, now that’s out of the way, let’s get started! The first step is to add our <a href="https://github.com/..." data-href="https://github.com/..." class="markup--anchor markup--p-anchor" rel="noopener" target="_blank">repo for the Helm chart</a>:
</p>
<pre data-code-block-mode="2" spellcheck="false" data-code-block-lang="bash" name="2296" id="2296" class="graf graf--pre graf-after--p graf--preV2">
<span class="pre--content">helm repo add passbolt-repo https://download.passbolt.com/charts/passbolt</span>
</pre>
Ghost.io mobiledoc:
[
1,
"p",
[
[
0,
[],
0,
"Well, now that’s out of the way, let’s get started! The first step is to add our "
],
[
0,
[6],
1,
"repo for the Helm chart"
],
[
0,
[],
0,
":helm repo add passbolt-repo https://download.passbolt.com/charts/passbolt"
]
]
]
Here the whole <pre>
tag was stripped and merge with the previous p
tag
Hi @MasGaNo, thanks for reporting this and providing the source HTML! I'm working on a fix and will update this issue when that's done.
This should now be fixed and released in @tryghost/migrate@0.32.0
. Thanks again for reporting!
Hello the team,
I'm facing an error while using the migrate tools to convert medium.com posts to Ghost posts:
Medium.com code block:
Actual Ghost.io code block:
Expected Ghost.io code block:
Medium.com exported HTML code:
Ghost.io mobiledoc:
As you can see, all
<br>
tag were stripped during the process of migration.It may happen somewhere in the convertPost function which uses
@tryghost/html-to-mobiledoc
under the hood, and itself is using @tryghost/kg-parser-plugins to parse the HTML by removing allbr
tag as the allowBr option is not correctly apply.I'm using:
Thank you.