Skip to content

Fix multiline Note rendering broken for dbdiagram.io parser#49

Open
miratcan wants to merge 1 commit into
makecodes:mainfrom
miratcan:fix/table-note-multiline-render
Open

Fix multiline Note rendering broken for dbdiagram.io parser#49
miratcan wants to merge 1 commit into
makecodes:mainfrom
miratcan:fix/table-note-multiline-render

Conversation

@miratcan

Copy link
Copy Markdown

The DBML renderer outputs table-level and field-level multiline notes with the closing ' on the same line as the last content line.

  Note: '''
content
*table: public.foo*'''

The dbdiagram.io (DBML) parser expects the closing ' to be on its own line for proper multiline string termination.

  Note: '''
content
*table: public.foo*
'''

Same fix applied to field-level note: ''' multiline attributes (e.g. verbose_name + help_text + choices).

Before → dbdiagram.io import errors on any table with a note (M2M linking tables, or models with docstrings/comments).

After → clean import, all notes display correctly.

- Fix table-level Note: multiline closing ''' now on its own line
  instead of at end of last content line, fixing dbdiagram.io parse
  errors for table notes.
- Same fix for field-level multiline notes (note: '''...''').

The parser expects the closing triple single-quote to be on a separate
line for proper multiline string termination.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant