@@ -247,36 +247,6 @@ def format_element(
247247 return format_element (element , evaluation , SymbolFullForm , ** kwargs )
248248
249249
250- def new_format_element (
251- element : BaseElement , evaluation : Evaluation , form : Symbol , ** kwargs
252- ) -> Optional [BaseElement ]:
253- """
254- Applies formats associated to the expression, and then calls Makeboxes
255- """
256-
257- from mathics .core .convert .prettyprint import expression_to_2d_text
258-
259- if form is SymbolOutputForm :
260- txt2d_form = expression_to_2d_text (element , evaluation , form , ** kwargs )
261- return String (txt2d_form .text )
262-
263- expr = do_format (element , evaluation , form )
264- if expr is None :
265- return None
266- if form in (SymbolStandardForm , SymbolTraditionalForm ):
267- result = Expression (SymbolMakeBoxes , expr , form )
268- else :
269- expr = Expression (form , expr )
270- result = Expression (SymbolMakeBoxes , expr , SymbolStandardForm )
271- result_box = result .evaluate (evaluation )
272- if isinstance (result_box , String ):
273- return result_box
274- if isinstance (result_box , BoxElementMixin ):
275- return result_box
276- else :
277- return format_element (element , evaluation , SymbolFullForm , ** kwargs )
278-
279-
280250# do_format_*
281251
282252
0 commit comments