TinoDidriksen/Transfuse

space lost around <embed>

Closed this issue · 2 comments

$ echo 'a <embed> e' |apertium -f html spa-eng
To<embed>And</embed>

expected:

To <embed> And</embed>

(or maybe To <embed/> And)

Full example was something like

<p>See <embed data-content-id="123" data-link-text="Spot" data-resource="concept" data-type="inline"> run.</p

tfspace.zip

$ cd /tmp
$ unzip ~/Downloads/tfspace.zip
$ $ tf-inject --keep -f html < /tmp/tfspace/repro
a<embed>e</embed>
$ cat /tmp/tfspace/repro
[transfuse:\/tmp\/tfspace\/repro.d]

[tf-block:1-j7FMRw]

a .[]

[tf-block:2-y6Sc6A]

 e
.[]

The spaces survived the regular pipeline, but were then removed by tf-inject. (I notice if I delete the NUL's before passing on to tf-inject, the spaces are retained (or actually copy-paste from terminal and not notice that there are in fact NUL's :)).)

This seems to have been fixed at some point, probably in 9201d89