Skip to content

Commit a41a8d1

Browse files
committed
Add `Meta_with_itemprop to follow spec
1 parent 3c6fceb commit a41a8d1

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

lib/html_f.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ struct
831831

832832
let meta = terminal "meta"
833833

834+
let meta_itemprop itemprop ?(a = []) () =
835+
Xml.leaf ~a: ((a_itemprop itemprop) :: a) "meta"
836+
834837
let style ?(a = []) elts = Xml.node ~a "style" elts
835838

836839
let link ~rel ~href ?(a = []) () =

lib/html_sigs.mli

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,10 @@ module type T = sig
10971097

10981098
val meta : ([< | meta_attrib], [> | meta]) nullary
10991099

1100+
val meta_itemprop :
1101+
string wrap ->
1102+
([< | meta_attrib], [> | meta_with_itemprop]) nullary
1103+
11001104
(** {3 Style Sheets} *)
11011105

11021106
val style :

lib/html_types.mli

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ type core_phrasing =
582582
| `Img | `Img_interactive
583583
| `Picture
584584
| `PCDATA
585+
| `Meta_with_itemprop
585586
]
586587

587588
type core_phrasing_without_noscript =
@@ -622,6 +623,7 @@ type core_phrasing_without_noscript =
622623
| `B
623624
| `Abbr
624625
| `PCDATA
626+
| `Meta_with_itemprop
625627
]
626628
type core_phrasing_without_interactive =
627629
[
@@ -657,6 +659,7 @@ type core_phrasing_without_interactive =
657659
| `B
658660
| `Abbr
659661
| `PCDATA
662+
| `Meta_with_itemprop
660663
]
661664

662665
type core_phrasing_without_media =
@@ -697,6 +700,7 @@ type core_phrasing_without_media =
697700
| `B
698701
| `Abbr
699702
| `PCDATA
703+
| `Meta_with_itemprop
700704
]
701705

702706
type phrasing_without_noscript =
@@ -733,9 +737,10 @@ type (+'a, +'b) between_phrasing_and_phrasing_without_interactive =
733737
phrasing,
734738
phrasing_without_media) transparent
735739
> `Abbr `B `Bdo `Br `Canvas `Cite `Code `Command
736-
`Datalist `Del `Dfn `Em `I `Img `Picture `Ins `Kbd `Map `Mark `Meter
737-
`Noscript `Object `PCDATA `Progress `Q `Ruby `Samp `Script
738-
`Small `Span `Strong `Sub `Sup `Svg `Template `Time `U `Var `Wbr ] as 'a)
740+
`Datalist `Del `Dfn `Em `I `Img `Picture `Ins `Kbd `Map `Mark
741+
`Meta_with_itemprop `Meter `Noscript `Object `PCDATA `Progress `Q `Ruby
742+
`Samp `Script `Small `Span `Strong `Sub `Sup `Svg `Template `Time `U
743+
`Var `Wbr ] as 'a)
739744

740745
(** Phrasing without the interactive markups *)
741746
type phrasing_without_dfn =
@@ -772,6 +777,7 @@ type phrasing_without_dfn =
772777
| `B
773778
| `Abbr
774779
| `PCDATA
780+
| `Meta_with_itemprop
775781
| (phrasing_without_interactive, phrasing_without_noscript,
776782
phrasing_without_dfn, phrasing_without_media) transparent
777783
]
@@ -810,6 +816,7 @@ type phrasing_without_label =
810816
| `B
811817
| `Abbr
812818
| `PCDATA
819+
| `Meta_with_itemprop
813820
| (phrasing_without_interactive, phrasing_without_noscript,
814821
phrasing_without_label, phrasing_without_media) transparent
815822
]
@@ -851,6 +858,7 @@ type phrasing_without_progress =
851858
| `B
852859
| `Abbr
853860
| `PCDATA
861+
| `Meta_with_itemprop
854862
| (phrasing_without_interactive, phrasing_without_noscript,
855863
phrasing_without_progress, phrasing_without_media) transparent
856864
]
@@ -889,6 +897,7 @@ type phrasing_without_time =
889897
| `B
890898
| `Abbr
891899
| `PCDATA
900+
| `Meta_with_itemprop
892901
| (phrasing_without_interactive, phrasing_without_noscript,
893902
phrasing_without_time, phrasing_without_media) transparent
894903
]
@@ -930,6 +939,7 @@ type phrasing_without_meter =
930939
| `B
931940
| `Abbr
932941
| `PCDATA
942+
| `Meta_with_itemprop
933943
| (phrasing_without_interactive, phrasing_without_noscript,
934944
phrasing_without_meter, phrasing_without_media) transparent
935945
]
@@ -2287,6 +2297,8 @@ type noscript_attrib = [ | common ]
22872297
(* NAME: meta, KIND: nullary, TYPE: [= common | `Http_equiv | `Name | `Content | `Charset ], [=`Meta], ARG: notag, ATTRIB: OUT: [=`Meta] *)
22882298
type meta = [ | `Meta ]
22892299

2300+
type meta_with_itemprop = [ | `Meta_with_itemprop ]
2301+
22902302
type meta_content = notag
22912303

22922304
type meta_content_fun = notag

0 commit comments

Comments
 (0)