Skip to content

Commit

Permalink
bug(renderer): Wrong code for (TM) (#642)
Browse files Browse the repository at this point in the history
We were using the code 153, which is not the same value used by
asciidoctor, and doesn't uniformly render as the trademark
symbol.

Fixes #641

Co-authored-by: Xavier Coulon <[email protected]>
  • Loading branch information
gdamore and xcoulon authored Jun 25, 2020
1 parent 2d34c13 commit f8cb430
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/renderer/sgml/html5/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var _ = Describe("strings", func() {
It("text with trademark", func() {
source := `TheRightThing(TM)`
expected := `<div class="paragraph">
<p>TheRightThing&#153;</p>
<p>TheRightThing&#8482;</p>
</div>`
Expect(RenderHTML(source)).To(MatchHTML(expected))
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/renderer/sgml/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func copyright(source string) string {
}

func trademark(source string) string {
return strings.Replace(source, "(TM)", "&#153;", -1)
return strings.Replace(source, "(TM)", "&#8482;", -1)
}

func registered(source string) string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/renderer/sgml/xhtml5/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var _ = Describe("strings", func() {
It("text with trademark", func() {
source := `TheRightThing(TM)`
expected := `<div class="paragraph">
<p>TheRightThing&#153;</p>
<p>TheRightThing&#8482;</p>
</div>`
Expect(RenderXHTML(source)).To(MatchHTML(expected))
})
Expand Down

0 comments on commit f8cb430

Please sign in to comment.