I agree in the case of Huck Finn, but if you look at the slurs in Tom Sawyer there are not many and they are mostly inessential, which is funny because Tom Sawyer functions as a racist book, whereas Huck Finn is anti-racist.
https://medium.com/luminasticity/mark-twain-racism-2-tom-saw...