Commit 9a74e566 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize-rules): Fix typo

* test/lisp/textmodes/sgml-mode-tests.el (sgml-tests--quotes-syntax):
New corresponding test.
parent e7e92dc5
Pipeline #1677 failed with stage
in 50 minutes and 16 seconds
......@@ -345,7 +345,7 @@ Any terminating `>' or `/' is not matched.")
;; the resulting number of calls to syntax-ppss made it too slow
;; (bug#33887), so we're now careful to leave alone any pair
;; of quotes that doesn't hold a < or > char, which is the vast majority.
(1 (unless (memq (char-before) '(?\' ?\"))
;; Be careful to call `syntax-ppss' on a position before the one
;; we're going to change, so as not to need to flush the data we
......@@ -160,5 +160,12 @@ The point is set to the beginning of the buffer."
(sgml-quote (point-min) (point-max) t)
(should (string= "&&" (buffer-string))))))
(ert-deftest sgml-tests--quotes-syntax ()
(insert "a\"b <tag>c'd</tag>")
(should (= 1 (car (syntax-ppss (1- (point-max))))))
(should (= 0 (car (syntax-ppss (point-max)))))))
(provide 'sgml-mode-tests)
;;; sgml-mode-tests.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment