Trim whitespace from parent element only

前端 未结 3 779
粉色の甜心
粉色の甜心 2020-12-21 12:31

I\'d like to trim the leading whitespace inside p tags in XML, so this:

Hey, italics and italics!

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-21 12:56

    You want:

     
      
     
    

    This wraps the string in "[]", then performs normalize-string(), then finally removes the wrapping characters.

提交回复
热议问题