diff --git a/src/ifcopenshell-python/ifcopenshell/util/doc.py b/src/ifcopenshell-python/ifcopenshell/util/doc.py index be780c0bd8..cd13f26f04 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/doc.py +++ b/src/ifcopenshell-python/ifcopenshell/util/doc.py @@ -283,8 +283,19 @@ class DocExtractor: items = [li.get_text() for li in child.find_all("li", recursive=False)] parts.append(" ".join(f"- {item}" for item in items)) else: - parts.append(child.get_text()) + part = child.get_text() + # Some IFC2X3 docs put the HISTORY remark in a plain leading + # paragraph rather than a blockquote; it is metadata, not part + # of the definition. + if re.match(r"\s*(HISTORY|IFC2x Edition)\b", part): + continue + parts.append(part) text = " ".join(parts) + # A remark can also be a "lazy" blockquote continuation inside a + # paragraph (a literal "> HISTORY ..." tail that markdown does not + # turn into a
) or an inline "HISTORY: ..." sentence; cut + # the definition there. + text = re.split(r"\s*(?:>\s*)?(?:HISTORY\s*:|>\s*HISTORY\b|(?:>\s*)?IFC2x Edition\b)", text)[0] # strip inline kramdown/pandoc attribute-list markers that survive as literal # text once we're no longer limited to the first paragraph, e.g. # "{ .change-ifc2x4}", "{ .note}", "{: .extDef}". diff --git a/src/ifcopenshell-python/ifcopenshell/util/schema/ifc2x3_types.json b/src/ifcopenshell-python/ifcopenshell/util/schema/ifc2x3_types.json index 3c8403c259..9818f3a41a 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/schema/ifc2x3_types.json +++ b/src/ifcopenshell-python/ifcopenshell/util/schema/ifc2x3_types.json @@ -416,7 +416,7 @@ "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcproductextension/lexical/ifcelementcompositionenum.htm" }, "IfcEnergyMeasure": { - "description": "A measure of energy required or used. Usually measured in Joules, (J, Nm). Type: REAL > HISTORY New type in IFC Release 2.0.", + "description": "A measure of energy required or used. Usually measured in Joules, (J, Nm). Type: REAL", "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcmeasureresource/lexical/ifcenergymeasure.htm" }, "IfcEnergySequenceEnum": { @@ -520,7 +520,7 @@ "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifchvacdomain/lexical/ifcheatexchangertypeenum.htm" }, "IfcHeatFluxDensityMeasure": { - "description": "A measure of the density of heat flux within a body. Usually measured in W/m2 (J/s m2). Type: REAL > HISTORY New type in IFC Release 2.0.", + "description": "A measure of the density of heat flux within a body. Usually measured in W/m2 (J/s m2). Type: REAL", "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcmeasureresource/lexical/ifcheatfluxdensitymeasure.htm" }, "IfcHeatingValueMeasure": { @@ -696,7 +696,7 @@ "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcsharedbldgelements/lexical/ifcmembertypeenum.htm" }, "IfcMetricValueSelect": { - "description": "An IfcMetricValueSelect is a select type that enables selection of the data type for the value component of an IfcMetric. HISTORY: New type in IFC Release 2.0 Select - IfcCostValue - IfcDateTimeSelect - IfcMetricBoundedValue - IfcMeasureWithUnit - IfcTable - IfcText - IfcTimeSeries", + "description": "An IfcMetricValueSelect is a select type that enables selection of the data type for the value component of an IfcMetric.", "spec_url": "https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ifcconstraintresource/lexical/ifcmetricvalueselect.htm" }, "IfcMinuteInHour": {