From: Günter M. <mi...@us...> - 2024-08-30 12:38:01
|
- **status**: open --> closed-fixed - **Group**: --> Default - **Comment**: Fixed by appliying [patches:47]. --- **[feature-requests:#18] Attributes in the main document are overriden** **Status:** closed-fixed **Group:** Default **Created:** Thu Mar 26, 2009 04:29 PM UTC by Jeffrey C. Jacobs **Last Updated:** Wed Jan 28, 2015 11:56 AM UTC **Owner:** nobody Any attributes set to the root document node are lost during a Title Promotion transformation because the update function is called instead of merging the attributes of the section into the document. For example, if a name is appended to the 'classes' attribute of the root document, this name is lost during the current version of the TitlePromoter transform. What I propose in the associated patch is to add more functionality to the Element class to handle generic attribute assignment and merging and then to call this instead of directly updating the attribute dictionary as done in the current code. This method has the ability to append rather than overwrite the basis attributes of an element as well as append any list elements in both the document and the section being merged in and replacing any attributes that are not both of list type with the values in the section node. This preserves the values in the document class list attributes as the user would expect. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |