INNER CODE UNIT · Python

j

DataTalksClub/datatalksclub.github.io · scripts/add_context_from_title.py:71

            j = i + 1
            while j < len(yaml_lines):
                next_line = yaml_lines[j]
                # If the next line starts with a space/tab, it's part of the title
                # If it starts with a letter/number (new field), title ends
                if next_line and not next_line[0].isspace() and next_line[0] != '-':
                    title_end = j - 1
                    break
                j += 1
            
            # If we reached the end without finding a new field
            if title_end is None:
                title_end = len(yaml_lines) - 1
            
            return title_start, title_end
        
        i += 1
    

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…