Issue2604.agda 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. -- Andreas, 2017-06-16, issue #2604:
  2. -- Symbolic anchors in generated HTML.
  3. module Issue2604 where
  4. test1 : Set₁ -- Symbolic anchor
  5. test1 = bla
  6. where
  7. bla = Set -- Position anchor
  8. test2 : Set₁ -- Symbolic anchor
  9. test2 = bla
  10. where
  11. bla = Set -- Position anchor
  12. test3 : Set₁ -- Symbolic anchor
  13. test3 = bla
  14. module M where
  15. bla = Set -- Symbolic anchor
  16. module NamedModule where
  17. test4 : Set₁ -- Symbolic anchor
  18. test4 = M.bla
  19. module _ where
  20. test5 : Set₁ -- Position anchor
  21. test5 = M.bla
  22. -- Testing whether # in anchors confuses the browsers.
  23. -- Not Firefox 54.0, at least (Andreas, 2017-06-20).
  24. -- However, the Nu Html Checker complains (someone else, later).
  25. # : Set₁
  26. # = Set
  27. #a : Set₁
  28. #a = #
  29. b# : Set₁
  30. b# = #a
  31. ## : Set₁
  32. ## = b#
  33. -- The href attribute values #A and #%41 are (correctly?) treated as
  34. -- pointers to the same destination by Firefox 54.0. To point to %41
  35. -- one should use #%2541.
  36. A : Set₁
  37. A = Set
  38. %41 : Set₁
  39. %41 = A
  40. -- Ampersands may need to be encoded in some way. The blaze-html
  41. -- library takes care of encoding id attribute values, and we manually
  42. -- replace ampersands with %26 in the fragment parts of href attribute
  43. -- values.
  44. &amp : Set₁
  45. &amp = Set
  46. &lt : Set₁
  47. &lt = &amp
  48. -- Test of fixity declarations. The id attribute value for the
  49. -- operator in the fixity declaration should be unique.
  50. infix 0 _%42∀_
  51. _%42∀_ : Set₁
  52. _%42∀_ = Set
  53. -- The following two variants of the character Ö should result in
  54. -- distinct links.
  55. Ö : Set₁
  56. Ö = Set
  57. Ö : Set₁
  58. Ö = Ö