Skip to content

Make the ID optional when parsing a module#41

Open
matiix310 wants to merge 1 commit into
Litarvan:masterfrom
matiix310:master
Open

Make the ID optional when parsing a module#41
matiix310 wants to merge 1 commit into
Litarvan:masterfrom
matiix310:master

Conversation

@matiix310

Copy link
Copy Markdown
Contributor

Goal

With the current parsing, the first word of the module name is interpreted as an ID. However there are some modules without any ID and / or with multiple words. This fix changes the regex so that the ID is now parsed as intended:

  • 'ID - Module name [X ECTS]'
  • '[ID] Module name [X ECTS]'
  • '[ID] - Module name [X ECTS]'
  • '[ID]-Module name [X ECTS]'
  • 'ID Module name [X ECTS]'
  • 'ID_Module name [X ECTS]'

Regex

Old regex

image

New regex

image

Context

In my Promo (2027) the modules can have multiple words and do not have ID for most of them. Therefore their name and ID are mixed up and sometimes they only have an ID and no name (name is considered as an ID).

@netlify

netlify Bot commented Mar 16, 2025

Copy link
Copy Markdown

Deploy Preview for infinity-pegasus failed.

Name Link
🔨 Latest commit 0817748
🔍 Latest deploy log https://app.netlify.com/sites/infinity-pegasus/deploys/67d6fac8954f600008c33ed1

@matiix310 matiix310 changed the title fix(module_regex): id is now optional when parsing a module Make the ID optional when parsing a module Mar 16, 2025
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