scribble
scribble copied to clipboard
Allow `math` to interpret content within `{}` as a (sub)superscript
See #411.
Please also add some tests in https://github.com/racket/scribble/blob/master/scribble-test/tests/scribble/docs/manual.scrbl
I don't know how to test in manual.scrbl that math interprets superscript and subscript correctly, maybe I should directly test that pregexp is correct?
You can write some content using math in the Scribble file, and then render it to text (https://github.com/racket/scribble/blob/master/scribble-test/tests/scribble/docs/manual.txt) and see if that's the result that you expect. If so, save the change. This will become the expected result that the test runner will compare against.
I just realized that we can achieve similar functionality by defining functions:
(define ^ (compose superscript math))
(define _ (compose subscript math))
I'm not sure if this PR is necessary, feel free to close it.
I will close the PR then, thanks.