|
|
|
|
|
by asmala
4963 days ago
|
|
Gotcha. How would you handle minor HTML changes, e.g. something like this: <!-- Original -->
<span class="username">joe</span>
<!-- New -->
<span class="username"><strong>joe</strong></span>
Updating the selector in the template is easy enough but seems a bit tedious if the design team decides to go for italics next week. Another option would be adding another CSS class or a data attribute to indicate which element should wrap username.How do you usually handle such scenarios? |
|
Anyway if you really want to program defensively against such changes, roll your own replacement to content fn which would replace the cornets not of the current node but of all its terminal descendants.
I'd like to know more about your workflow.