Skip to content

Commit

Permalink
migration changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Heulitig committed Apr 5, 2024
1 parent 68712d4 commit c581b09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fastn-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub(crate) use tracker::Track;
pub(crate) use translation::{TranslatedDocument, TranslationData};
pub use {doc::resolve_foreign_variable2, doc::resolve_import};

pub const FASTN_UI_INTERFACE: &str = "fastn-stack.github.io/fastn-ui";
pub const FASTN_UI_INTERFACE: &str = "fastn-ui.fifthtry-site";
pub const PACKAGE_THEME_INTERFACE: &str = "ftd-lang.github.io/theme";
pub const NUMBER_OF_CRS_TO_RESERVE: usize = 5;

Expand Down
5 changes: 5 additions & 0 deletions ftd/src/interpreter/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ pub fn get_argument_for_reference_and_remaining(
)>,
> {
if let Some((component_name, arguments)) = component_definition_name_with_arguments {
// Since we allow '.' in package names now which was not previously allowed
// To handle cases: (When package/site name starts with the component name)
// name: app-switcher.fifthtry-site#app-switcher.is-open
let name = name.trim_start_matches(format!("{}#", doc.name).as_str());

if let Some(referenced_argument) = name
.strip_prefix(format!("{}.", component_name).as_str())
.or_else(|| name.strip_prefix(format!("{}#{}.", doc.name, component_name).as_str()))
Expand Down

0 comments on commit c581b09

Please sign in to comment.