comparison runtime/indent/dtd.vim @ 25773:11b656e74444

Update runtime files Commit: https://github.com/vim/vim/commit/6c391a74fe90190796ca0b0c010112948a6e75d7 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 9 21:55:11 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Sep 2021 22:00:10 +0200
parents 0ecb909e3249
children 9c221ad9634a
comparison
equal deleted inserted replaced
25772:55753c17b73d 25773:11b656e74444
117 endif 117 endif
118 118
119 " Next comes the content model. If the token we’ve found isn’t a 119 " Next comes the content model. If the token we’ve found isn’t a
120 " parenthesis it must be either ANY, EMPTY or some random junk. Either 120 " parenthesis it must be either ANY, EMPTY or some random junk. Either
121 " way, we’re done indenting this element, so set it to that of the first 121 " way, we’re done indenting this element, so set it to that of the first
122 " line so that the terminating “>” winds up having the same indention. 122 " line so that the terminating “>” winds up having the same indentation.
123 if token != '(' 123 if token != '('
124 return indent 124 return indent
125 endif 125 endif
126 126
127 " Now go through the content model. We need to keep track of the nesting 127 " Now go through the content model. We need to keep track of the nesting
128 " of parentheses. As soon as we hit 0 we’re done. If that happens we must 128 " of parentheses. As soon as we hit 0 we’re done. If that happens we must
129 " have a complete content model. Thus set indention to be the same as that 129 " have a complete content model. Thus set indentation to be the same as that
130 " of the first line so that the terminating “>” winds up having the same 130 " of the first line so that the terminating “>” winds up having the same
131 " indention. Otherwise, we’ll indent to the innermost parentheses not yet 131 " indentation. Otherwise, we’ll indent to the innermost parentheses not yet
132 " matched. 132 " matched.
133 let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) 133 let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end)
134 if indent_of_innermost != -1 134 if indent_of_innermost != -1
135 return indent_of_innermost 135 return indent_of_innermost
136 endif 136 endif